//    |  /           |
//    ' /   __| _` | __|  _ \   __|
//    . \  |   (   | |   (   |\__ `
//   _|\_\_|  \__,_|\__|\___/ ____/
//                   Multi-Physics
//
//  License:         BSD License
//                   Kratos default license: kratos/license.txt
//
//  Main authors:    Ruben Zorrilla
//

// System includes


// External includes


// Project includes


// Application includes
#include "low_mach_navier_stokes.h"
#include "data_containers/low_mach_navier_stokes/low_mach_navier_stokes_data.h"

namespace Kratos
{

///////////////////////////////////////////////////////////////////////////////////////////////////
// Life cycle

template <class TElementData>
LowMachNavierStokes<TElementData>::LowMachNavierStokes(IndexType NewId)
    : BaseType(NewId)
{}

template <class TElementData>
LowMachNavierStokes<TElementData>::LowMachNavierStokes(
    IndexType NewId,
    const NodesArrayType& ThisNodes)
    : BaseType(NewId, ThisNodes)
{}

template <class TElementData>
LowMachNavierStokes<TElementData>::LowMachNavierStokes(
    IndexType NewId,
    typename GeometryType::Pointer pGeometry)
    : BaseType(NewId, pGeometry)
{}

template <class TElementData>
LowMachNavierStokes<TElementData>::LowMachNavierStokes(
    IndexType NewId,
    typename GeometryType::Pointer pGeometry,
    Properties::Pointer pProperties)
    : BaseType(NewId, pGeometry, pProperties)
{}

template <class TElementData>
LowMachNavierStokes<TElementData>::~LowMachNavierStokes()
{}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Public Operations

template< class TElementData >
Element::Pointer LowMachNavierStokes<TElementData>::Create(
    IndexType NewId,
    NodesArrayType const& ThisNodes,
    Properties::Pointer pProperties) const
{
    return Kratos::make_intrusive<LowMachNavierStokes>(NewId, this->GetGeometry().Create(ThisNodes), pProperties);
}


template< class TElementData >
Element::Pointer LowMachNavierStokes<TElementData>::Create(
    IndexType NewId,
    typename GeometryType::Pointer pGeometry,
    Properties::Pointer pProperties) const
{
    return Kratos::make_intrusive<LowMachNavierStokes>(NewId, pGeometry, pProperties);
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Public Inquiry

template <class TElementData>
int LowMachNavierStokes<TElementData>::Check(const ProcessInfo &rCurrentProcessInfo) const
{
    KRATOS_TRY;

    // Generic geometry check
    int out = Element::Check(rCurrentProcessInfo);
    if (out != 0) {
        return out;
    }

    // Check variables used by TElementData
    out = TElementData::Check(*this, rCurrentProcessInfo);
    KRATOS_ERROR_IF_NOT(out == 0)
        << "Something is wrong with the elemental data of Element "
        << this->Info() << std::endl;

    // Check nodes
    const auto& r_geometry = this->GetGeometry();
    for (const auto& r_node : r_geometry) {
        // Check nodal DOFs
        KRATOS_CHECK_DOF_IN_NODE(PRESSURE, r_node);
        KRATOS_CHECK_DOF_IN_NODE(VELOCITY_X, r_node);
        KRATOS_CHECK_DOF_IN_NODE(VELOCITY_Y, r_node);
        KRATOS_CHECK_DOF_IN_NODE(VELOCITY_Z, r_node);
        KRATOS_CHECK_DOF_IN_NODE(TEMPERATURE, r_node);
    }

    return 0;

    KRATOS_CATCH("");
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Public I/O

template<class TElementData>
const Parameters LowMachNavierStokes<TElementData>::GetSpecifications() const
{
    const Parameters specifications = Parameters(R"({
        "time_integration"           : ["implicit"],
        "framework"                  : "ale",
        "symmetric_lhs"              : false,
        "positive_definite_lhs"      : true,
        "output"                     : {
            "gauss_point"            : [],
            "nodal_historical"       : ["VELOCITY","PRESSURE","TEMPERATURE","DENSITY"],
            "nodal_non_historical"   : [],
            "entity"                 : []
        },
        "required_variables"         : ["VELOCITY","ACCELERATION","MESH_VELOCITY","PRESSURE","TEMPERATURE","BODY_FORCE","HEAT_FLUX","REACTION","REACTION_WATER_PRESSURE","REACTION_FLUX","EXTERNAL_PRESSURE","NORMAL"]
        "required_dofs"              : ["VELOCITY_X","VELOCITY_Y","PRESSURE","TEMPERATURE"],
        "flags_used"                 : [],
        "compatible_geometries"      : ["Triangle2D3","Quadrilateral2D4"],
        "element_integrates_in_time" : true,
        "compatible_constitutive_laws": {
           "type"        : ["Newtonian2DLaw","Newtonian3DLaw"],
            "dimension"   : ["2D","3D"],
            "strain_size" : [3,6]
        },
        "required_polynomial_degree_of_geometry" : 1,
        "documentation"   :
            "This implements a low Mach approximation Navier-Stokes element with quasi-static Variational MultiScales (VMS) stabilization."
    })");

    return specifications;
}

template <class TElementData>
std::string LowMachNavierStokes<TElementData>::Info() const
{
    std::stringstream buffer;
    buffer << "LowMachNavierStokes" << Dim << "D" << NumNodes << "N #" << this->Id();
    return buffer.str();
}

template <class TElementData>
void LowMachNavierStokes<TElementData>::PrintInfo(std::ostream& rOStream) const
{
    rOStream << this->Info() << std::endl;
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Public operations

template< class TElementData >
void LowMachNavierStokes<TElementData>::EquationIdVector(
    EquationIdVectorType& rResult,
    const ProcessInfo& rCurrentProcessInfo) const
{
    const auto& r_geometry = this->GetGeometry();

    if (rResult.size() != LocalSize) {
        rResult.resize(LocalSize, false);
    }

    const unsigned int p_pos = this->GetGeometry()[0].GetDofPosition(PRESSURE);
    const unsigned int x_pos = this->GetGeometry()[0].GetDofPosition(VELOCITY_X);
    const unsigned int t_pos = this->GetGeometry()[0].GetDofPosition(TEMPERATURE);

    unsigned int local_index = 0;
    for (unsigned int i = 0; i < NumNodes; ++i) {
        rResult[local_index++] = r_geometry[i].GetDof(PRESSURE, p_pos).EquationId();
        rResult[local_index++] = r_geometry[i].GetDof(VELOCITY_X, x_pos).EquationId();
        rResult[local_index++] = r_geometry[i].GetDof(VELOCITY_Y, x_pos+1).EquationId();
        if constexpr (Dim == 3) {
            rResult[local_index++] = r_geometry[i].GetDof(VELOCITY_Z, x_pos+2).EquationId();
        }
        rResult[local_index++] = r_geometry[i].GetDof(TEMPERATURE, t_pos).EquationId();
    }
}

template< class TElementData >
void LowMachNavierStokes<TElementData>::GetDofList(
    DofsVectorType& rElementalDofList,
    const ProcessInfo& rCurrentProcessInfo) const
{
    const auto& r_geometry = this->GetGeometry();

    if (rElementalDofList.size() != LocalSize) {
         rElementalDofList.resize(LocalSize);
    }

    const unsigned int p_pos = this->GetGeometry()[0].GetDofPosition(PRESSURE);
    const unsigned int x_pos = this->GetGeometry()[0].GetDofPosition(VELOCITY_X);
    const unsigned int t_pos = this->GetGeometry()[0].GetDofPosition(TEMPERATURE);

    unsigned int local_index = 0;
    for (unsigned int i = 0; i < NumNodes; ++i) {
        rElementalDofList[local_index++] = r_geometry[i].pGetDof(PRESSURE, p_pos);
        rElementalDofList[local_index++] = r_geometry[i].pGetDof(VELOCITY_X, x_pos);
        rElementalDofList[local_index++] = r_geometry[i].pGetDof(VELOCITY_Y, x_pos+1);
        if constexpr (Dim == 3) {
            rElementalDofList[local_index++] = r_geometry[i].pGetDof(VELOCITY_Z,x_pos+2);
        }
        rElementalDofList[local_index++] = r_geometry[i].pGetDof(TEMPERATURE, t_pos);
    }
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Protected operations

template <class TElementData>
void LowMachNavierStokes<TElementData>::AddTimeIntegratedSystem(
    TElementData& rData,
    MatrixType& rLHS,
    VectorType& rRHS)
{
    this->ComputeGaussPointLHSContribution(rData, rLHS);
    this->ComputeGaussPointRHSContribution(rData, rRHS);
}

template <class TElementData>
void LowMachNavierStokes<TElementData>::AddTimeIntegratedLHS(
    TElementData& rData,
    MatrixType& rLHS)
{
    this->ComputeGaussPointLHSContribution(rData, rLHS);
}

template <class TElementData>
void LowMachNavierStokes<TElementData>::AddTimeIntegratedRHS(
    TElementData& rData,
    VectorType& rRHS)
{
    this->ComputeGaussPointRHSContribution(rData, rRHS);
}

template <class TElementData>
void LowMachNavierStokes<TElementData>::AddBoundaryTraction(
    TElementData& rData,
    const Vector& rUnitNormal,
    MatrixType& rLHS,
    VectorType& rRHS)
{
    KRATOS_ERROR << "To be implemented" << std::endl;

    // // Set the current Gauss pt. Voigt notation normal projection matrix
    // BoundedMatrix<double, Dim, StrainSize> voigt_normal_projection_matrix = ZeroMatrix(Dim, StrainSize);
    // FluidElementUtilities<NumNodes>::VoigtTransformForProduct(rUnitNormal, voigt_normal_projection_matrix);

    // // Set the current Gauss pt. strain matrix
    // BoundedMatrix<double, StrainSize, LocalSize> B_matrix = ZeroMatrix(StrainSize, LocalSize);
    // FluidElementUtilities<NumNodes>::GetStrainMatrix(rData.DN_DX, B_matrix);

    // // Compute some Gauss pt. auxiliar matrices
    // const BoundedMatrix<double, Dim, StrainSize> aux_matrix_AC = prod(voigt_normal_projection_matrix, rData.C);
    // const BoundedMatrix<double, StrainSize, LocalSize> aux_matrix_ACB = prod(aux_matrix_AC, B_matrix);

    // // Fill the pressure to Voigt notation operator matrix
    // BoundedMatrix<double, StrainSize, LocalSize> pres_to_voigt_matrix_op = ZeroMatrix(StrainSize, LocalSize);
    // for (unsigned int i=0; i<NumNodes; ++i) {
    //     for (unsigned int comp=0; comp<Dim; ++comp) {
    //         pres_to_voigt_matrix_op(comp, i*BlockSize+Dim) = rData.N[i];
    //     }
    // }

    // // Set the shape functions auxiliar transpose matrix
    // BoundedMatrix<double, LocalSize, Dim> N_aux_trans = ZeroMatrix(LocalSize, Dim);
    // for (unsigned int i=0; i<NumNodes; ++i) {
    //     for (unsigned int comp=0; comp<Dim; ++comp) {
    //         N_aux_trans(i*BlockSize+comp, comp) = rData.N[i];
    //     }
    // }

    // // Contribution coming from the shear stress operator
    // noalias(rData.lhs) = prod(N_aux_trans, aux_matrix_ACB);

    // // Contribution coming from the pressure terms
    // const BoundedMatrix<double, LocalSize, StrainSize> N_voigt_proj_matrix = prod(N_aux_trans, voigt_normal_projection_matrix);
    // noalias(rData.lhs) -= prod(N_voigt_proj_matrix, pres_to_voigt_matrix_op);

    // array_1d<double,LocalSize> values;
    // this->GetCurrentValuesVector(rData,values);

    // rData.lhs *= 2.0 * Globals::Pi * y * rData.Weight;
    // noalias(rLHS) -= rData.lhs;
    // noalias(rRHS) += prod(rData.lhs,values);
}

template <>
void LowMachNavierStokes< LowMachNavierStokesData<2,3> >::ComputeGaussPointLHSContribution(
    LowMachNavierStokesData<2,3>& rData,
    MatrixType& rLHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;
    const double sigma = rData.Resistance;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_C = rData.C;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;

    // Nodal data
    const auto& r_u = rData.Velocity;
    const auto& r_t = rData.Temperature;
    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double,2,3> lin_u_conv = rData.Velocity - rData.MeshVelocity;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add LHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crLHS0 = r_DN(0,0)*r_DN(0,0);
const double crLHS1 = r_DN(0,1)*r_DN(0,1);
const double crLHS2 = 1.0/(gamma - 1.0);
const double crLHS3 = crLHS2*gamma*p_th;
const double crLHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2];
const double crLHS5 = 1.0/crLHS4;
const double crLHS6 = 1.0/c_p;
const double crLHS7 = crLHS5*crLHS6;
const double crLHS8 = crLHS3*crLHS7;
const double crLHS9 = crLHS8*gauss_weight;
const double crLHS10 = crLHS9*tau_u;
const double crLHS11 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2];
const double crLHS12 = r_N[0]*r_N[0];
const double crLHS13 = crLHS12*crLHS5;
const double crLHS14 = r_N[0]*sigma;
const double crLHS15 = bdf0*r_N[0];
const double crLHS16 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2];
const double crLHS17 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2];
const double crLHS18 = crLHS16*r_DN(0,0) + crLHS17*r_DN(0,1);
const double crLHS19 = crLHS3*(crLHS15 + crLHS18);
const double crLHS20 = tau_u*(crLHS14 + crLHS19*crLHS7);
const double crLHS21 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2];
const double crLHS22 = bdf0*crLHS3;
const double crLHS23 = 1.0/(crLHS4*crLHS4);
const double crLHS24 = crLHS23*crLHS6;
const double crLHS25 = crLHS22*crLHS24*gauss_weight;
const double crLHS26 = r_DN(0,0)*r_DN(1,0);
const double crLHS27 = r_DN(0,1)*r_DN(1,1);
const double crLHS28 = crLHS10*(crLHS26 + crLHS27);
const double crLHS29 = r_DN(1,0)*r_N[0];
const double crLHS30 = crLHS5*r_N[0];
const double crLHS31 = crLHS30*r_N[1];
const double crLHS32 = -crLHS11*crLHS31;
const double crLHS33 = r_N[1]*sigma;
const double crLHS34 = bdf0*r_N[1];
const double crLHS35 = crLHS16*r_DN(1,0) + crLHS17*r_DN(1,1);
const double crLHS36 = crLHS3*(crLHS34 + crLHS35);
const double crLHS37 = tau_u*(crLHS33 + crLHS36*crLHS7);
const double crLHS38 = r_DN(1,1)*r_N[0];
const double crLHS39 = -crLHS21*crLHS31;
const double crLHS40 = crLHS3*gauss_weight;
const double crLHS41 = crLHS40*r_N[1];
const double crLHS42 = crLHS15*crLHS24;
const double crLHS43 = -crLHS41*crLHS42;
const double crLHS44 = r_DN(0,0)*r_DN(2,0);
const double crLHS45 = r_DN(0,1)*r_DN(2,1);
const double crLHS46 = crLHS10*(crLHS44 + crLHS45);
const double crLHS47 = r_DN(2,0)*r_N[0];
const double crLHS48 = crLHS30*r_N[2];
const double crLHS49 = -crLHS11*crLHS48;
const double crLHS50 = r_N[2]*sigma;
const double crLHS51 = bdf0*r_N[2];
const double crLHS52 = crLHS16*r_DN(2,0) + crLHS17*r_DN(2,1);
const double crLHS53 = crLHS3*(crLHS51 + crLHS52);
const double crLHS54 = tau_u*(crLHS50 + crLHS53*crLHS7);
const double crLHS55 = r_DN(2,1)*r_N[0];
const double crLHS56 = -crLHS21*crLHS48;
const double crLHS57 = crLHS40*r_N[2];
const double crLHS58 = -crLHS42*crLHS57;
const double crLHS59 = crLHS14*tau_u;
const double crLHS60 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1);
const double crLHS61 = crLHS3*(crLHS11*crLHS16 + crLHS17*crLHS21);
const double crLHS62 = crLHS61*r_N[0];
const double crLHS63 = crLHS24*tau_u;
const double crLHS64 = gauss_weight*(crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_N[0]*tau_u - crLHS59 - crLHS62*crLHS63 - r_N[0]);
const double crLHS65 = r_C(0,0)*r_DN(0,0) + r_C(0,2)*r_DN(0,1);
const double crLHS66 = r_C(0,2)*r_DN(0,0);
const double crLHS67 = crLHS66 + r_C(2,2)*r_DN(0,1);
const double crLHS68 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2];
const double crLHS69 = crLHS30*crLHS68;
const double crLHS70 = -crLHS69 + r_DN(0,0);
const double crLHS71 = crLHS8*tau_c;
const double crLHS72 = crLHS71*r_DN(0,0);
const double crLHS73 = crLHS13*crLHS22;
const double crLHS74 = crLHS3*crLHS30;
const double crLHS75 = crLHS6*crLHS74;
const double crLHS76 = crLHS18*crLHS8;
const double crLHS77 = crLHS60*crLHS75;
const double crLHS78 = crLHS24*crLHS62;
const double crLHS79 = crLHS12*sigma - crLHS14*crLHS20 + crLHS18*crLHS75 + crLHS20*crLHS76 + crLHS20*crLHS77 - crLHS20*crLHS78 + crLHS6*crLHS73;
const double crLHS80 = crLHS66 + r_C(0,1)*r_DN(0,1);
const double crLHS81 = r_C(1,2)*r_DN(0,1);
const double crLHS82 = crLHS81 + r_C(2,2)*r_DN(0,0);
const double crLHS83 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2];
const double crLHS84 = crLHS30*crLHS83;
const double crLHS85 = -crLHS84 + r_DN(0,1);
const double crLHS86 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0));
const double crLHS87 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1));
const double crLHS88 = crLHS86*r_DN(0,0) + crLHS87*r_DN(0,1);
const double crLHS89 = crLHS15 + crLHS88;
const double crLHS90 = crLHS24*crLHS40*tau_c;
const double crLHS91 = crLHS90*r_DN(0,0);
const double crLHS92 = r_DN(0,0)*r_N[1];
const double crLHS93 = crLHS61*crLHS63;
const double crLHS94 = r_C(0,0)*r_DN(1,0) + r_C(0,2)*r_DN(1,1);
const double crLHS95 = r_C(0,2)*r_DN(1,0);
const double crLHS96 = crLHS95 + r_C(2,2)*r_DN(1,1);
const double crLHS97 = crLHS5*r_N[1];
const double crLHS98 = crLHS68*crLHS97;
const double crLHS99 = -crLHS98 + r_DN(1,0);
const double crLHS100 = crLHS3*crLHS97;
const double crLHS101 = crLHS100*crLHS15;
const double crLHS102 = crLHS101*crLHS6 + crLHS14*r_N[1];
const double crLHS103 = crLHS102 - crLHS14*crLHS37 + crLHS35*crLHS75 + crLHS37*crLHS76 + crLHS37*crLHS77 - crLHS37*crLHS78;
const double crLHS104 = crLHS95 + r_C(0,1)*r_DN(1,1);
const double crLHS105 = r_C(1,2)*r_DN(1,1);
const double crLHS106 = crLHS105 + r_C(2,2)*r_DN(1,0);
const double crLHS107 = crLHS83*crLHS97;
const double crLHS108 = -crLHS107 + r_DN(1,1);
const double crLHS109 = crLHS86*r_DN(1,0) + crLHS87*r_DN(1,1);
const double crLHS110 = crLHS109 + crLHS34;
const double crLHS111 = r_DN(0,0)*r_N[2];
const double crLHS112 = r_C(0,0)*r_DN(2,0) + r_C(0,2)*r_DN(2,1);
const double crLHS113 = r_C(0,2)*r_DN(2,0);
const double crLHS114 = crLHS113 + r_C(2,2)*r_DN(2,1);
const double crLHS115 = crLHS5*r_N[2];
const double crLHS116 = -crLHS115*crLHS68 + r_DN(2,0);
const double crLHS117 = crLHS115*crLHS3;
const double crLHS118 = crLHS117*crLHS15;
const double crLHS119 = crLHS118*crLHS6 + crLHS14*r_N[2];
const double crLHS120 = crLHS119 - crLHS14*crLHS54 + crLHS52*crLHS75 + crLHS54*crLHS76 + crLHS54*crLHS77 - crLHS54*crLHS78;
const double crLHS121 = crLHS113 + r_C(0,1)*r_DN(2,1);
const double crLHS122 = r_C(1,2)*r_DN(2,1);
const double crLHS123 = crLHS122 + r_C(2,2)*r_DN(2,0);
const double crLHS124 = -crLHS115*crLHS83 + r_DN(2,1);
const double crLHS125 = crLHS86*r_DN(2,0) + crLHS87*r_DN(2,1);
const double crLHS126 = crLHS125 + crLHS51;
const double crLHS127 = crLHS81 + r_C(0,1)*r_DN(0,0);
const double crLHS128 = crLHS71*r_DN(0,1);
const double crLHS129 = r_C(1,1)*r_DN(0,1) + r_C(1,2)*r_DN(0,0);
const double crLHS130 = crLHS90*r_DN(0,1);
const double crLHS131 = r_DN(0,1)*r_N[1];
const double crLHS132 = crLHS105 + r_C(0,1)*r_DN(1,0);
const double crLHS133 = r_C(1,1)*r_DN(1,1) + r_C(1,2)*r_DN(1,0);
const double crLHS134 = r_DN(0,1)*r_N[2];
const double crLHS135 = crLHS122 + r_C(0,1)*r_DN(2,0);
const double crLHS136 = r_C(1,1)*r_DN(2,1) + r_C(1,2)*r_DN(2,0);
const double crLHS137 = crLHS13*crLHS40;
const double crLHS138 = -crLHS19 + dp_th_dt*r_N[0];
const double crLHS139 = tau_t*1.0/(crLHS4*crLHS4*crLHS4);
const double crLHS140 = crLHS139*crLHS62;
const double crLHS141 = crLHS41*crLHS69;
const double crLHS142 = crLHS41*crLHS84;
const double crLHS143 = -crLHS36 + dp_th_dt*r_N[1];
const double crLHS144 = crLHS101 + crLHS26*kappa + crLHS27*kappa - crLHS5*dp_th_dt*r_N[0]*r_N[1];
const double crLHS145 = crLHS57*crLHS69;
const double crLHS146 = crLHS57*crLHS84;
const double crLHS147 = -crLHS53 + dp_th_dt*r_N[2];
const double crLHS148 = crLHS118 + crLHS44*kappa + crLHS45*kappa - crLHS5*dp_th_dt*r_N[0]*r_N[2];
const double crLHS149 = r_DN(1,0)*r_DN(1,0);
const double crLHS150 = r_DN(1,1)*r_DN(1,1);
const double crLHS151 = r_N[1]*r_N[1];
const double crLHS152 = crLHS151*crLHS5;
const double crLHS153 = r_DN(1,0)*r_DN(2,0);
const double crLHS154 = r_DN(1,1)*r_DN(2,1);
const double crLHS155 = crLHS10*(crLHS153 + crLHS154);
const double crLHS156 = r_DN(2,0)*r_N[1];
const double crLHS157 = crLHS97*r_N[2];
const double crLHS158 = -crLHS11*crLHS157;
const double crLHS159 = r_DN(2,1)*r_N[1];
const double crLHS160 = -crLHS157*crLHS21;
const double crLHS161 = -crLHS24*crLHS34*crLHS57;
const double crLHS162 = crLHS33*tau_u;
const double crLHS163 = crLHS71*r_DN(1,0);
const double crLHS164 = crLHS100*crLHS6;
const double crLHS165 = crLHS35*crLHS8;
const double crLHS166 = crLHS164*crLHS60;
const double crLHS167 = crLHS61*r_N[1];
const double crLHS168 = crLHS167*crLHS24;
const double crLHS169 = crLHS102 + crLHS164*crLHS18 + crLHS165*crLHS20 + crLHS166*crLHS20 - crLHS168*crLHS20 - crLHS20*crLHS33;
const double crLHS170 = crLHS90*r_DN(1,0);
const double crLHS171 = gauss_weight*(-crLHS162 - crLHS167*crLHS63 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_N[1]*tau_u - r_N[1]);
const double crLHS172 = crLHS152*crLHS22;
const double crLHS173 = crLHS151*sigma + crLHS164*crLHS35 + crLHS165*crLHS37 + crLHS166*crLHS37 - crLHS168*crLHS37 + crLHS172*crLHS6 - crLHS33*crLHS37;
const double crLHS174 = r_DN(1,0)*r_N[2];
const double crLHS175 = crLHS117*crLHS34;
const double crLHS176 = crLHS175*crLHS6 + crLHS33*r_N[2];
const double crLHS177 = crLHS164*crLHS52 + crLHS165*crLHS54 + crLHS166*crLHS54 - crLHS168*crLHS54 + crLHS176 - crLHS33*crLHS54;
const double crLHS178 = crLHS71*r_DN(1,1);
const double crLHS179 = crLHS90*r_DN(1,1);
const double crLHS180 = r_DN(1,1)*r_N[2];
const double crLHS181 = crLHS139*crLHS167;
const double crLHS182 = crLHS152*crLHS40;
const double crLHS183 = crLHS57*crLHS98;
const double crLHS184 = crLHS107*crLHS57;
const double crLHS185 = crLHS153*kappa + crLHS154*kappa + crLHS175 - crLHS5*dp_th_dt*r_N[1]*r_N[2];
const double crLHS186 = r_DN(2,0)*r_DN(2,0);
const double crLHS187 = r_DN(2,1)*r_DN(2,1);
const double crLHS188 = r_N[2]*r_N[2];
const double crLHS189 = crLHS188*crLHS5;
const double crLHS190 = crLHS50*tau_u;
const double crLHS191 = crLHS71*r_DN(2,0);
const double crLHS192 = crLHS117*crLHS6;
const double crLHS193 = crLHS52*crLHS8;
const double crLHS194 = crLHS192*crLHS60;
const double crLHS195 = crLHS61*r_N[2];
const double crLHS196 = crLHS195*crLHS24;
const double crLHS197 = crLHS119 + crLHS18*crLHS192 + crLHS193*crLHS20 + crLHS194*crLHS20 - crLHS196*crLHS20 - crLHS20*crLHS50;
const double crLHS198 = crLHS90*r_DN(2,0);
const double crLHS199 = crLHS176 + crLHS192*crLHS35 + crLHS193*crLHS37 + crLHS194*crLHS37 - crLHS196*crLHS37 - crLHS37*crLHS50;
const double crLHS200 = gauss_weight*(-crLHS190 - crLHS195*crLHS63 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_N[2]*tau_u - r_N[2]);
const double crLHS201 = crLHS189*crLHS22;
const double crLHS202 = crLHS188*sigma + crLHS192*crLHS52 + crLHS193*crLHS54 + crLHS194*crLHS54 - crLHS196*crLHS54 + crLHS201*crLHS6 - crLHS50*crLHS54;
const double crLHS203 = crLHS71*r_DN(2,1);
const double crLHS204 = crLHS90*r_DN(2,1);
const double crLHS205 = crLHS139*crLHS195;
const double crLHS206 = crLHS189*crLHS40;
rLHS(0,0)+=crLHS10*(crLHS0 + crLHS1);
rLHS(0,1)+=crLHS9*(-crLHS11*crLHS13 + crLHS20*r_DN(0,0) + r_DN(0,0)*r_N[0]);
rLHS(0,2)+=crLHS9*(-crLHS13*crLHS21 + crLHS20*r_DN(0,1) + r_DN(0,1)*r_N[0]);
rLHS(0,3)+=-crLHS12*crLHS25;
rLHS(0,4)+=crLHS28;
rLHS(0,5)+=crLHS9*(crLHS29 + crLHS32 + crLHS37*r_DN(0,0));
rLHS(0,6)+=crLHS9*(crLHS37*r_DN(0,1) + crLHS38 + crLHS39);
rLHS(0,7)+=crLHS43;
rLHS(0,8)+=crLHS46;
rLHS(0,9)+=crLHS9*(crLHS47 + crLHS49 + crLHS54*r_DN(0,0));
rLHS(0,10)+=crLHS9*(crLHS54*r_DN(0,1) + crLHS55 + crLHS56);
rLHS(0,11)+=crLHS58;
rLHS(1,0)+=crLHS64*r_DN(0,0);
rLHS(1,1)+=gauss_weight*(crLHS65*r_DN(0,0) + crLHS67*r_DN(0,1) + crLHS70*crLHS72 + crLHS79);
rLHS(1,2)+=gauss_weight*(crLHS72*crLHS85 + crLHS80*r_DN(0,0) + crLHS82*r_DN(0,1));
rLHS(1,3)+=-crLHS89*crLHS91;
rLHS(1,4)+=gauss_weight*(crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(1,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(1,0)*r_N[0]*tau_u - crLHS29*crLHS93 - crLHS59*r_DN(1,0) - crLHS92);
rLHS(1,5)+=gauss_weight*(crLHS103 + crLHS72*crLHS99 + crLHS94*r_DN(0,0) + crLHS96*r_DN(0,1));
rLHS(1,6)+=gauss_weight*(crLHS104*r_DN(0,0) + crLHS106*r_DN(0,1) + crLHS108*crLHS72);
rLHS(1,7)+=-crLHS110*crLHS91;
rLHS(1,8)+=gauss_weight*(-crLHS111 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(2,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(2,0)*r_N[0]*tau_u - crLHS47*crLHS93 - crLHS59*r_DN(2,0));
rLHS(1,9)+=gauss_weight*(crLHS112*r_DN(0,0) + crLHS114*r_DN(0,1) + crLHS116*crLHS72 + crLHS120);
rLHS(1,10)+=gauss_weight*(crLHS121*r_DN(0,0) + crLHS123*r_DN(0,1) + crLHS124*crLHS72);
rLHS(1,11)+=-crLHS126*crLHS91;
rLHS(2,0)+=crLHS64*r_DN(0,1);
rLHS(2,1)+=gauss_weight*(crLHS127*r_DN(0,1) + crLHS128*crLHS70 + crLHS67*r_DN(0,0));
rLHS(2,2)+=gauss_weight*(crLHS128*crLHS85 + crLHS129*r_DN(0,1) + crLHS79 + crLHS82*r_DN(0,0));
rLHS(2,3)+=-crLHS130*crLHS89;
rLHS(2,4)+=gauss_weight*(-crLHS131 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(1,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(1,1)*r_N[0]*tau_u - crLHS38*crLHS93 - crLHS59*r_DN(1,1));
rLHS(2,5)+=gauss_weight*(crLHS128*crLHS99 + crLHS132*r_DN(0,1) + crLHS96*r_DN(0,0));
rLHS(2,6)+=gauss_weight*(crLHS103 + crLHS106*r_DN(0,0) + crLHS108*crLHS128 + crLHS133*r_DN(0,1));
rLHS(2,7)+=-crLHS110*crLHS130;
rLHS(2,8)+=gauss_weight*(-crLHS134 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(2,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(2,1)*r_N[0]*tau_u - crLHS55*crLHS93 - crLHS59*r_DN(2,1));
rLHS(2,9)+=gauss_weight*(crLHS114*r_DN(0,0) + crLHS116*crLHS128 + crLHS135*r_DN(0,1));
rLHS(2,10)+=gauss_weight*(crLHS120 + crLHS123*r_DN(0,0) + crLHS124*crLHS128 + crLHS136*r_DN(0,1));
rLHS(2,11)+=-crLHS126*crLHS130;
rLHS(3,0)+=0;
rLHS(3,1)+=crLHS137*crLHS68;
rLHS(3,2)+=crLHS137*crLHS83;
rLHS(3,3)+=-gauss_weight*(-crLHS0*kappa - crLHS1*kappa + crLHS12*crLHS5*dp_th_dt - crLHS138*crLHS140 + crLHS138*crLHS18*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS138*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[0]*tau_t + crLHS138*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS73 - crLHS74*crLHS88);
rLHS(3,4)+=0;
rLHS(3,5)+=crLHS141;
rLHS(3,6)+=crLHS142;
rLHS(3,7)+=-gauss_weight*(-crLHS109*crLHS74 - crLHS140*crLHS143 + crLHS143*crLHS18*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS143*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[0]*tau_t + crLHS143*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS144);
rLHS(3,8)+=0;
rLHS(3,9)+=crLHS145;
rLHS(3,10)+=crLHS146;
rLHS(3,11)+=-gauss_weight*(-crLHS125*crLHS74 - crLHS140*crLHS147 + crLHS147*crLHS18*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS147*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[0]*tau_t + crLHS147*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS148);
rLHS(4,0)+=crLHS28;
rLHS(4,1)+=crLHS9*(crLHS20*r_DN(1,0) + crLHS32 + crLHS92);
rLHS(4,2)+=crLHS9*(crLHS131 + crLHS20*r_DN(1,1) + crLHS39);
rLHS(4,3)+=crLHS43;
rLHS(4,4)+=crLHS10*(crLHS149 + crLHS150);
rLHS(4,5)+=crLHS9*(-crLHS11*crLHS152 + crLHS37*r_DN(1,0) + r_DN(1,0)*r_N[1]);
rLHS(4,6)+=crLHS9*(-crLHS152*crLHS21 + crLHS37*r_DN(1,1) + r_DN(1,1)*r_N[1]);
rLHS(4,7)+=-crLHS151*crLHS25;
rLHS(4,8)+=crLHS155;
rLHS(4,9)+=crLHS9*(crLHS156 + crLHS158 + crLHS54*r_DN(1,0));
rLHS(4,10)+=crLHS9*(crLHS159 + crLHS160 + crLHS54*r_DN(1,1));
rLHS(4,11)+=crLHS161;
rLHS(5,0)+=gauss_weight*(-crLHS162*r_DN(0,0) + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(0,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(0,0)*r_N[1]*tau_u - crLHS29 - crLHS92*crLHS93);
rLHS(5,1)+=gauss_weight*(crLHS163*crLHS70 + crLHS169 + crLHS65*r_DN(1,0) + crLHS67*r_DN(1,1));
rLHS(5,2)+=gauss_weight*(crLHS163*crLHS85 + crLHS80*r_DN(1,0) + crLHS82*r_DN(1,1));
rLHS(5,3)+=-crLHS170*crLHS89;
rLHS(5,4)+=crLHS171*r_DN(1,0);
rLHS(5,5)+=gauss_weight*(crLHS163*crLHS99 + crLHS173 + crLHS94*r_DN(1,0) + crLHS96*r_DN(1,1));
rLHS(5,6)+=gauss_weight*(crLHS104*r_DN(1,0) + crLHS106*r_DN(1,1) + crLHS108*crLHS163);
rLHS(5,7)+=-crLHS110*crLHS170;
rLHS(5,8)+=gauss_weight*(-crLHS156*crLHS93 - crLHS162*r_DN(2,0) - crLHS174 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(2,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(2,0)*r_N[1]*tau_u);
rLHS(5,9)+=gauss_weight*(crLHS112*r_DN(1,0) + crLHS114*r_DN(1,1) + crLHS116*crLHS163 + crLHS177);
rLHS(5,10)+=gauss_weight*(crLHS121*r_DN(1,0) + crLHS123*r_DN(1,1) + crLHS124*crLHS163);
rLHS(5,11)+=-crLHS126*crLHS170;
rLHS(6,0)+=gauss_weight*(-crLHS131*crLHS93 - crLHS162*r_DN(0,1) + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(0,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(0,1)*r_N[1]*tau_u - crLHS38);
rLHS(6,1)+=gauss_weight*(crLHS127*r_DN(1,1) + crLHS178*crLHS70 + crLHS67*r_DN(1,0));
rLHS(6,2)+=gauss_weight*(crLHS129*r_DN(1,1) + crLHS169 + crLHS178*crLHS85 + crLHS82*r_DN(1,0));
rLHS(6,3)+=-crLHS179*crLHS89;
rLHS(6,4)+=crLHS171*r_DN(1,1);
rLHS(6,5)+=gauss_weight*(crLHS132*r_DN(1,1) + crLHS178*crLHS99 + crLHS96*r_DN(1,0));
rLHS(6,6)+=gauss_weight*(crLHS106*r_DN(1,0) + crLHS108*crLHS178 + crLHS133*r_DN(1,1) + crLHS173);
rLHS(6,7)+=-crLHS110*crLHS179;
rLHS(6,8)+=gauss_weight*(-crLHS159*crLHS93 - crLHS162*r_DN(2,1) - crLHS180 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(2,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(2,1)*r_N[1]*tau_u);
rLHS(6,9)+=gauss_weight*(crLHS114*r_DN(1,0) + crLHS116*crLHS178 + crLHS135*r_DN(1,1));
rLHS(6,10)+=gauss_weight*(crLHS123*r_DN(1,0) + crLHS124*crLHS178 + crLHS136*r_DN(1,1) + crLHS177);
rLHS(6,11)+=-crLHS126*crLHS179;
rLHS(7,0)+=0;
rLHS(7,1)+=crLHS141;
rLHS(7,2)+=crLHS142;
rLHS(7,3)+=-gauss_weight*(-crLHS100*crLHS88 - crLHS138*crLHS181 + crLHS138*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS138*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[1]*tau_t + crLHS138*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS144);
rLHS(7,4)+=0;
rLHS(7,5)+=crLHS182*crLHS68;
rLHS(7,6)+=crLHS182*crLHS83;
rLHS(7,7)+=-gauss_weight*(-crLHS100*crLHS109 - crLHS143*crLHS181 + crLHS143*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS143*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[1]*tau_t + crLHS143*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS149*kappa - crLHS150*kappa + crLHS151*crLHS5*dp_th_dt - crLHS172);
rLHS(7,8)+=0;
rLHS(7,9)+=crLHS183;
rLHS(7,10)+=crLHS184;
rLHS(7,11)+=-gauss_weight*(-crLHS100*crLHS125 - crLHS147*crLHS181 + crLHS147*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS147*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[1]*tau_t + crLHS147*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS185);
rLHS(8,0)+=crLHS46;
rLHS(8,1)+=crLHS9*(crLHS111 + crLHS20*r_DN(2,0) + crLHS49);
rLHS(8,2)+=crLHS9*(crLHS134 + crLHS20*r_DN(2,1) + crLHS56);
rLHS(8,3)+=crLHS58;
rLHS(8,4)+=crLHS155;
rLHS(8,5)+=crLHS9*(crLHS158 + crLHS174 + crLHS37*r_DN(2,0));
rLHS(8,6)+=crLHS9*(crLHS160 + crLHS180 + crLHS37*r_DN(2,1));
rLHS(8,7)+=crLHS161;
rLHS(8,8)+=crLHS10*(crLHS186 + crLHS187);
rLHS(8,9)+=crLHS9*(-crLHS11*crLHS189 + crLHS54*r_DN(2,0) + r_DN(2,0)*r_N[2]);
rLHS(8,10)+=crLHS9*(-crLHS189*crLHS21 + crLHS54*r_DN(2,1) + r_DN(2,1)*r_N[2]);
rLHS(8,11)+=-crLHS188*crLHS25;
rLHS(9,0)+=gauss_weight*(-crLHS111*crLHS93 - crLHS190*r_DN(0,0) + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(0,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(0,0)*r_N[2]*tau_u - crLHS47);
rLHS(9,1)+=gauss_weight*(crLHS191*crLHS70 + crLHS197 + crLHS65*r_DN(2,0) + crLHS67*r_DN(2,1));
rLHS(9,2)+=gauss_weight*(crLHS191*crLHS85 + crLHS80*r_DN(2,0) + crLHS82*r_DN(2,1));
rLHS(9,3)+=-crLHS198*crLHS89;
rLHS(9,4)+=gauss_weight*(-crLHS156 - crLHS174*crLHS93 - crLHS190*r_DN(1,0) + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(1,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(1,0)*r_N[2]*tau_u);
rLHS(9,5)+=gauss_weight*(crLHS191*crLHS99 + crLHS199 + crLHS94*r_DN(2,0) + crLHS96*r_DN(2,1));
rLHS(9,6)+=gauss_weight*(crLHS104*r_DN(2,0) + crLHS106*r_DN(2,1) + crLHS108*crLHS191);
rLHS(9,7)+=-crLHS110*crLHS198;
rLHS(9,8)+=crLHS200*r_DN(2,0);
rLHS(9,9)+=gauss_weight*(crLHS112*r_DN(2,0) + crLHS114*r_DN(2,1) + crLHS116*crLHS191 + crLHS202);
rLHS(9,10)+=gauss_weight*(crLHS121*r_DN(2,0) + crLHS123*r_DN(2,1) + crLHS124*crLHS191);
rLHS(9,11)+=-crLHS126*crLHS198;
rLHS(10,0)+=gauss_weight*(-crLHS134*crLHS93 - crLHS190*r_DN(0,1) + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(0,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(0,1)*r_N[2]*tau_u - crLHS55);
rLHS(10,1)+=gauss_weight*(crLHS127*r_DN(2,1) + crLHS203*crLHS70 + crLHS67*r_DN(2,0));
rLHS(10,2)+=gauss_weight*(crLHS129*r_DN(2,1) + crLHS197 + crLHS203*crLHS85 + crLHS82*r_DN(2,0));
rLHS(10,3)+=-crLHS204*crLHS89;
rLHS(10,4)+=gauss_weight*(-crLHS159 - crLHS180*crLHS93 - crLHS190*r_DN(1,1) + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(1,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS60*gamma*p_th*r_DN(1,1)*r_N[2]*tau_u);
rLHS(10,5)+=gauss_weight*(crLHS132*r_DN(2,1) + crLHS203*crLHS99 + crLHS96*r_DN(2,0));
rLHS(10,6)+=gauss_weight*(crLHS106*r_DN(2,0) + crLHS108*crLHS203 + crLHS133*r_DN(2,1) + crLHS199);
rLHS(10,7)+=-crLHS110*crLHS204;
rLHS(10,8)+=crLHS200*r_DN(2,1);
rLHS(10,9)+=gauss_weight*(crLHS114*r_DN(2,0) + crLHS116*crLHS203 + crLHS135*r_DN(2,1));
rLHS(10,10)+=gauss_weight*(crLHS123*r_DN(2,0) + crLHS124*crLHS203 + crLHS136*r_DN(2,1) + crLHS202);
rLHS(10,11)+=-crLHS126*crLHS204;
rLHS(11,0)+=0;
rLHS(11,1)+=crLHS145;
rLHS(11,2)+=crLHS146;
rLHS(11,3)+=-gauss_weight*(-crLHS117*crLHS88 + crLHS138*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS138*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[2]*tau_t - crLHS138*crLHS205 + crLHS138*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS148);
rLHS(11,4)+=0;
rLHS(11,5)+=crLHS183;
rLHS(11,6)+=crLHS184;
rLHS(11,7)+=-gauss_weight*(-crLHS109*crLHS117 + crLHS143*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS143*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[2]*tau_t - crLHS143*crLHS205 + crLHS143*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS185);
rLHS(11,8)+=0;
rLHS(11,9)+=crLHS206*crLHS68;
rLHS(11,10)+=crLHS206*crLHS83;
rLHS(11,11)+=-gauss_weight*(-crLHS117*crLHS125 + crLHS147*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS147*crLHS2*crLHS23*crLHS60*gamma*p_th*r_N[2]*tau_t - crLHS147*crLHS205 + crLHS147*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS186*kappa - crLHS187*kappa + crLHS188*crLHS5*dp_th_dt - crLHS201);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<2,4>>::ComputeGaussPointLHSContribution(
    LowMachNavierStokesData<2,4>& rData,
    MatrixType& rLHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_C = rData.C;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;

    // Nodal data
    const auto& r_u = rData.Velocity;
    const auto& r_t = rData.Temperature;
    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double,2,4> lin_u_conv = rData.Velocity - rData.MeshVelocity;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add LHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crLHS0 = r_DN(0,0)*r_DN(0,0);
const double crLHS1 = r_DN(0,1)*r_DN(0,1);
const double crLHS2 = 1.0/(gamma - 1.0);
const double crLHS3 = crLHS2*gamma*p_th;
const double crLHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2] + r_N[3]*r_t_lin[3];
const double crLHS5 = 1.0/crLHS4;
const double crLHS6 = 1.0/c_p;
const double crLHS7 = crLHS5*crLHS6;
const double crLHS8 = crLHS3*crLHS7;
const double crLHS9 = crLHS8*gauss_weight;
const double crLHS10 = crLHS9*tau_u;
const double crLHS11 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2] + r_DN(3,0)*r_t_lin[3];
const double crLHS12 = r_N[0]*r_N[0];
const double crLHS13 = crLHS12*crLHS5;
const double crLHS14 = r_N[0]*sigma;
const double crLHS15 = bdf0*r_N[0];
const double crLHS16 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2] + lin_u_conv(3,0)*r_N[3];
const double crLHS17 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2] + lin_u_conv(3,1)*r_N[3];
const double crLHS18 = crLHS16*r_DN(0,0) + crLHS17*r_DN(0,1);
const double crLHS19 = crLHS3*(crLHS15 + crLHS18);
const double crLHS20 = tau_u*(crLHS14 + crLHS19*crLHS7);
const double crLHS21 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2] + r_DN(3,1)*r_t_lin[3];
const double crLHS22 = bdf0*crLHS3;
const double crLHS23 = 1.0/(crLHS4*crLHS4);
const double crLHS24 = crLHS23*crLHS6;
const double crLHS25 = crLHS22*crLHS24*gauss_weight;
const double crLHS26 = r_DN(0,0)*r_DN(1,0);
const double crLHS27 = r_DN(0,1)*r_DN(1,1);
const double crLHS28 = crLHS10*(crLHS26 + crLHS27);
const double crLHS29 = r_DN(1,0)*r_N[0];
const double crLHS30 = crLHS5*r_N[0];
const double crLHS31 = crLHS30*r_N[1];
const double crLHS32 = -crLHS11*crLHS31;
const double crLHS33 = r_N[1]*sigma;
const double crLHS34 = bdf0*r_N[1];
const double crLHS35 = crLHS16*r_DN(1,0) + crLHS17*r_DN(1,1);
const double crLHS36 = crLHS3*(crLHS34 + crLHS35);
const double crLHS37 = tau_u*(crLHS33 + crLHS36*crLHS7);
const double crLHS38 = r_DN(1,1)*r_N[0];
const double crLHS39 = -crLHS21*crLHS31;
const double crLHS40 = crLHS3*gauss_weight;
const double crLHS41 = crLHS40*r_N[1];
const double crLHS42 = crLHS15*crLHS24;
const double crLHS43 = -crLHS41*crLHS42;
const double crLHS44 = r_DN(0,0)*r_DN(2,0);
const double crLHS45 = r_DN(0,1)*r_DN(2,1);
const double crLHS46 = crLHS10*(crLHS44 + crLHS45);
const double crLHS47 = r_DN(2,0)*r_N[0];
const double crLHS48 = crLHS30*r_N[2];
const double crLHS49 = -crLHS11*crLHS48;
const double crLHS50 = r_N[2]*sigma;
const double crLHS51 = bdf0*r_N[2];
const double crLHS52 = crLHS16*r_DN(2,0) + crLHS17*r_DN(2,1);
const double crLHS53 = crLHS3*(crLHS51 + crLHS52);
const double crLHS54 = tau_u*(crLHS50 + crLHS53*crLHS7);
const double crLHS55 = r_DN(2,1)*r_N[0];
const double crLHS56 = -crLHS21*crLHS48;
const double crLHS57 = crLHS40*r_N[2];
const double crLHS58 = -crLHS42*crLHS57;
const double crLHS59 = r_DN(0,0)*r_DN(3,0);
const double crLHS60 = r_DN(0,1)*r_DN(3,1);
const double crLHS61 = crLHS10*(crLHS59 + crLHS60);
const double crLHS62 = r_DN(3,0)*r_N[0];
const double crLHS63 = crLHS30*r_N[3];
const double crLHS64 = -crLHS11*crLHS63;
const double crLHS65 = r_N[3]*sigma;
const double crLHS66 = bdf0*r_N[3];
const double crLHS67 = crLHS16*r_DN(3,0) + crLHS17*r_DN(3,1);
const double crLHS68 = crLHS3*(crLHS66 + crLHS67);
const double crLHS69 = tau_u*(crLHS65 + crLHS68*crLHS7);
const double crLHS70 = r_DN(3,1)*r_N[0];
const double crLHS71 = -crLHS21*crLHS63;
const double crLHS72 = crLHS40*r_N[3];
const double crLHS73 = -crLHS42*crLHS72;
const double crLHS74 = crLHS14*tau_u;
const double crLHS75 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1) + lin_u_conv(3,0)*r_DN(3,0) + lin_u_conv(3,1)*r_DN(3,1);
const double crLHS76 = crLHS3*(crLHS11*crLHS16 + crLHS17*crLHS21);
const double crLHS77 = crLHS76*r_N[0];
const double crLHS78 = crLHS24*tau_u;
const double crLHS79 = gauss_weight*(crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_N[0]*tau_u - crLHS74 - crLHS77*crLHS78 - r_N[0]);
const double crLHS80 = r_C(0,0)*r_DN(0,0) + r_C(0,2)*r_DN(0,1);
const double crLHS81 = r_C(0,2)*r_DN(0,0);
const double crLHS82 = crLHS81 + r_C(2,2)*r_DN(0,1);
const double crLHS83 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2] + r_DN(3,0)*r_t[3];
const double crLHS84 = crLHS30*crLHS83;
const double crLHS85 = -crLHS84 + r_DN(0,0);
const double crLHS86 = crLHS8*tau_c;
const double crLHS87 = crLHS86*r_DN(0,0);
const double crLHS88 = crLHS13*crLHS22;
const double crLHS89 = crLHS3*crLHS30;
const double crLHS90 = crLHS6*crLHS89;
const double crLHS91 = crLHS18*crLHS8;
const double crLHS92 = crLHS75*crLHS90;
const double crLHS93 = crLHS24*crLHS77;
const double crLHS94 = crLHS12*sigma - crLHS14*crLHS20 + crLHS18*crLHS90 + crLHS20*crLHS91 + crLHS20*crLHS92 - crLHS20*crLHS93 + crLHS6*crLHS88;
const double crLHS95 = crLHS81 + r_C(0,1)*r_DN(0,1);
const double crLHS96 = r_C(1,2)*r_DN(0,1);
const double crLHS97 = crLHS96 + r_C(2,2)*r_DN(0,0);
const double crLHS98 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2] + r_DN(3,1)*r_t[3];
const double crLHS99 = crLHS30*crLHS98;
const double crLHS100 = -crLHS99 + r_DN(0,1);
const double crLHS101 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0)) + r_N[3]*(r_u(3,0) - r_u_mesh(3,0));
const double crLHS102 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1)) + r_N[3]*(r_u(3,1) - r_u_mesh(3,1));
const double crLHS103 = crLHS101*r_DN(0,0) + crLHS102*r_DN(0,1);
const double crLHS104 = crLHS103 + crLHS15;
const double crLHS105 = crLHS24*crLHS40*tau_c;
const double crLHS106 = crLHS105*r_DN(0,0);
const double crLHS107 = r_DN(0,0)*r_N[1];
const double crLHS108 = crLHS76*crLHS78;
const double crLHS109 = r_C(0,0)*r_DN(1,0) + r_C(0,2)*r_DN(1,1);
const double crLHS110 = r_C(0,2)*r_DN(1,0);
const double crLHS111 = crLHS110 + r_C(2,2)*r_DN(1,1);
const double crLHS112 = crLHS5*r_N[1];
const double crLHS113 = crLHS112*crLHS83;
const double crLHS114 = -crLHS113 + r_DN(1,0);
const double crLHS115 = crLHS112*crLHS3;
const double crLHS116 = crLHS115*crLHS15;
const double crLHS117 = crLHS116*crLHS6 + crLHS14*r_N[1];
const double crLHS118 = crLHS117 - crLHS14*crLHS37 + crLHS35*crLHS90 + crLHS37*crLHS91 + crLHS37*crLHS92 - crLHS37*crLHS93;
const double crLHS119 = crLHS110 + r_C(0,1)*r_DN(1,1);
const double crLHS120 = r_C(1,2)*r_DN(1,1);
const double crLHS121 = crLHS120 + r_C(2,2)*r_DN(1,0);
const double crLHS122 = crLHS112*crLHS98;
const double crLHS123 = -crLHS122 + r_DN(1,1);
const double crLHS124 = crLHS101*r_DN(1,0) + crLHS102*r_DN(1,1);
const double crLHS125 = crLHS124 + crLHS34;
const double crLHS126 = r_DN(0,0)*r_N[2];
const double crLHS127 = r_C(0,0)*r_DN(2,0) + r_C(0,2)*r_DN(2,1);
const double crLHS128 = r_C(0,2)*r_DN(2,0);
const double crLHS129 = crLHS128 + r_C(2,2)*r_DN(2,1);
const double crLHS130 = crLHS5*r_N[2];
const double crLHS131 = crLHS130*crLHS83;
const double crLHS132 = -crLHS131 + r_DN(2,0);
const double crLHS133 = crLHS130*crLHS3;
const double crLHS134 = crLHS133*crLHS15;
const double crLHS135 = crLHS134*crLHS6 + crLHS14*r_N[2];
const double crLHS136 = crLHS135 - crLHS14*crLHS54 + crLHS52*crLHS90 + crLHS54*crLHS91 + crLHS54*crLHS92 - crLHS54*crLHS93;
const double crLHS137 = crLHS128 + r_C(0,1)*r_DN(2,1);
const double crLHS138 = r_C(1,2)*r_DN(2,1);
const double crLHS139 = crLHS138 + r_C(2,2)*r_DN(2,0);
const double crLHS140 = crLHS130*crLHS98;
const double crLHS141 = -crLHS140 + r_DN(2,1);
const double crLHS142 = crLHS101*r_DN(2,0) + crLHS102*r_DN(2,1);
const double crLHS143 = crLHS142 + crLHS51;
const double crLHS144 = r_DN(0,0)*r_N[3];
const double crLHS145 = r_C(0,0)*r_DN(3,0) + r_C(0,2)*r_DN(3,1);
const double crLHS146 = r_C(0,2)*r_DN(3,0);
const double crLHS147 = crLHS146 + r_C(2,2)*r_DN(3,1);
const double crLHS148 = crLHS5*r_N[3];
const double crLHS149 = -crLHS148*crLHS83 + r_DN(3,0);
const double crLHS150 = crLHS148*crLHS3;
const double crLHS151 = crLHS15*crLHS150;
const double crLHS152 = crLHS14*r_N[3] + crLHS151*crLHS6;
const double crLHS153 = -crLHS14*crLHS69 + crLHS152 + crLHS67*crLHS90 + crLHS69*crLHS91 + crLHS69*crLHS92 - crLHS69*crLHS93;
const double crLHS154 = crLHS146 + r_C(0,1)*r_DN(3,1);
const double crLHS155 = r_C(1,2)*r_DN(3,1);
const double crLHS156 = crLHS155 + r_C(2,2)*r_DN(3,0);
const double crLHS157 = -crLHS148*crLHS98 + r_DN(3,1);
const double crLHS158 = crLHS101*r_DN(3,0) + crLHS102*r_DN(3,1);
const double crLHS159 = crLHS158 + crLHS66;
const double crLHS160 = crLHS96 + r_C(0,1)*r_DN(0,0);
const double crLHS161 = crLHS86*r_DN(0,1);
const double crLHS162 = r_C(1,1)*r_DN(0,1) + r_C(1,2)*r_DN(0,0);
const double crLHS163 = crLHS105*r_DN(0,1);
const double crLHS164 = r_DN(0,1)*r_N[1];
const double crLHS165 = crLHS120 + r_C(0,1)*r_DN(1,0);
const double crLHS166 = r_C(1,1)*r_DN(1,1) + r_C(1,2)*r_DN(1,0);
const double crLHS167 = r_DN(0,1)*r_N[2];
const double crLHS168 = crLHS138 + r_C(0,1)*r_DN(2,0);
const double crLHS169 = r_C(1,1)*r_DN(2,1) + r_C(1,2)*r_DN(2,0);
const double crLHS170 = r_DN(0,1)*r_N[3];
const double crLHS171 = crLHS155 + r_C(0,1)*r_DN(3,0);
const double crLHS172 = r_C(1,1)*r_DN(3,1) + r_C(1,2)*r_DN(3,0);
const double crLHS173 = crLHS13*crLHS40;
const double crLHS174 = -crLHS19 + dp_th_dt*r_N[0];
const double crLHS175 = tau_t*1.0/(crLHS4*crLHS4*crLHS4);
const double crLHS176 = crLHS175*crLHS77;
const double crLHS177 = crLHS41*crLHS84;
const double crLHS178 = crLHS41*crLHS99;
const double crLHS179 = -crLHS36 + dp_th_dt*r_N[1];
const double crLHS180 = crLHS116 + crLHS26*kappa + crLHS27*kappa - crLHS5*dp_th_dt*r_N[0]*r_N[1];
const double crLHS181 = crLHS57*crLHS84;
const double crLHS182 = crLHS57*crLHS99;
const double crLHS183 = -crLHS53 + dp_th_dt*r_N[2];
const double crLHS184 = crLHS134 + crLHS44*kappa + crLHS45*kappa - crLHS5*dp_th_dt*r_N[0]*r_N[2];
const double crLHS185 = crLHS72*crLHS84;
const double crLHS186 = crLHS72*crLHS99;
const double crLHS187 = -crLHS68 + dp_th_dt*r_N[3];
const double crLHS188 = crLHS151 - crLHS5*dp_th_dt*r_N[0]*r_N[3] + crLHS59*kappa + crLHS60*kappa;
const double crLHS189 = r_DN(1,0)*r_DN(1,0);
const double crLHS190 = r_DN(1,1)*r_DN(1,1);
const double crLHS191 = r_N[1]*r_N[1];
const double crLHS192 = crLHS191*crLHS5;
const double crLHS193 = r_DN(1,0)*r_DN(2,0);
const double crLHS194 = r_DN(1,1)*r_DN(2,1);
const double crLHS195 = crLHS10*(crLHS193 + crLHS194);
const double crLHS196 = r_DN(2,0)*r_N[1];
const double crLHS197 = crLHS112*r_N[2];
const double crLHS198 = -crLHS11*crLHS197;
const double crLHS199 = r_DN(2,1)*r_N[1];
const double crLHS200 = -crLHS197*crLHS21;
const double crLHS201 = crLHS24*crLHS34;
const double crLHS202 = -crLHS201*crLHS57;
const double crLHS203 = r_DN(1,0)*r_DN(3,0);
const double crLHS204 = r_DN(1,1)*r_DN(3,1);
const double crLHS205 = crLHS10*(crLHS203 + crLHS204);
const double crLHS206 = r_DN(3,0)*r_N[1];
const double crLHS207 = crLHS112*r_N[3];
const double crLHS208 = -crLHS11*crLHS207;
const double crLHS209 = r_DN(3,1)*r_N[1];
const double crLHS210 = -crLHS207*crLHS21;
const double crLHS211 = -crLHS201*crLHS72;
const double crLHS212 = crLHS33*tau_u;
const double crLHS213 = crLHS86*r_DN(1,0);
const double crLHS214 = crLHS115*crLHS6;
const double crLHS215 = crLHS35*crLHS8;
const double crLHS216 = crLHS214*crLHS75;
const double crLHS217 = crLHS76*r_N[1];
const double crLHS218 = crLHS217*crLHS24;
const double crLHS219 = crLHS117 + crLHS18*crLHS214 + crLHS20*crLHS215 + crLHS20*crLHS216 - crLHS20*crLHS218 - crLHS20*crLHS33;
const double crLHS220 = crLHS105*r_DN(1,0);
const double crLHS221 = gauss_weight*(crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_N[1]*tau_u - crLHS212 - crLHS217*crLHS78 - r_N[1]);
const double crLHS222 = crLHS192*crLHS22;
const double crLHS223 = crLHS191*sigma + crLHS214*crLHS35 + crLHS215*crLHS37 + crLHS216*crLHS37 - crLHS218*crLHS37 + crLHS222*crLHS6 - crLHS33*crLHS37;
const double crLHS224 = r_DN(1,0)*r_N[2];
const double crLHS225 = crLHS133*crLHS34;
const double crLHS226 = crLHS225*crLHS6 + crLHS33*r_N[2];
const double crLHS227 = crLHS214*crLHS52 + crLHS215*crLHS54 + crLHS216*crLHS54 - crLHS218*crLHS54 + crLHS226 - crLHS33*crLHS54;
const double crLHS228 = r_DN(1,0)*r_N[3];
const double crLHS229 = crLHS150*crLHS34;
const double crLHS230 = crLHS229*crLHS6 + crLHS33*r_N[3];
const double crLHS231 = crLHS214*crLHS67 + crLHS215*crLHS69 + crLHS216*crLHS69 - crLHS218*crLHS69 + crLHS230 - crLHS33*crLHS69;
const double crLHS232 = crLHS86*r_DN(1,1);
const double crLHS233 = crLHS105*r_DN(1,1);
const double crLHS234 = r_DN(1,1)*r_N[2];
const double crLHS235 = r_DN(1,1)*r_N[3];
const double crLHS236 = crLHS175*crLHS217;
const double crLHS237 = crLHS192*crLHS40;
const double crLHS238 = crLHS113*crLHS57;
const double crLHS239 = crLHS122*crLHS57;
const double crLHS240 = crLHS193*kappa + crLHS194*kappa + crLHS225 - crLHS5*dp_th_dt*r_N[1]*r_N[2];
const double crLHS241 = crLHS113*crLHS72;
const double crLHS242 = crLHS122*crLHS72;
const double crLHS243 = crLHS203*kappa + crLHS204*kappa + crLHS229 - crLHS5*dp_th_dt*r_N[1]*r_N[3];
const double crLHS244 = r_DN(2,0)*r_DN(2,0);
const double crLHS245 = r_DN(2,1)*r_DN(2,1);
const double crLHS246 = r_N[2]*r_N[2];
const double crLHS247 = crLHS246*crLHS5;
const double crLHS248 = r_DN(2,0)*r_DN(3,0);
const double crLHS249 = r_DN(2,1)*r_DN(3,1);
const double crLHS250 = crLHS10*(crLHS248 + crLHS249);
const double crLHS251 = r_DN(3,0)*r_N[2];
const double crLHS252 = crLHS130*r_N[3];
const double crLHS253 = -crLHS11*crLHS252;
const double crLHS254 = r_DN(3,1)*r_N[2];
const double crLHS255 = -crLHS21*crLHS252;
const double crLHS256 = -crLHS24*crLHS51*crLHS72;
const double crLHS257 = crLHS50*tau_u;
const double crLHS258 = crLHS86*r_DN(2,0);
const double crLHS259 = crLHS133*crLHS6;
const double crLHS260 = crLHS52*crLHS8;
const double crLHS261 = crLHS259*crLHS75;
const double crLHS262 = crLHS76*r_N[2];
const double crLHS263 = crLHS24*crLHS262;
const double crLHS264 = crLHS135 + crLHS18*crLHS259 + crLHS20*crLHS260 + crLHS20*crLHS261 - crLHS20*crLHS263 - crLHS20*crLHS50;
const double crLHS265 = crLHS105*r_DN(2,0);
const double crLHS266 = crLHS226 + crLHS259*crLHS35 + crLHS260*crLHS37 + crLHS261*crLHS37 - crLHS263*crLHS37 - crLHS37*crLHS50;
const double crLHS267 = gauss_weight*(crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_N[2]*tau_u - crLHS257 - crLHS262*crLHS78 - r_N[2]);
const double crLHS268 = crLHS22*crLHS247;
const double crLHS269 = crLHS246*sigma + crLHS259*crLHS52 + crLHS260*crLHS54 + crLHS261*crLHS54 - crLHS263*crLHS54 + crLHS268*crLHS6 - crLHS50*crLHS54;
const double crLHS270 = r_DN(2,0)*r_N[3];
const double crLHS271 = crLHS150*crLHS51;
const double crLHS272 = crLHS271*crLHS6 + crLHS50*r_N[3];
const double crLHS273 = crLHS259*crLHS67 + crLHS260*crLHS69 + crLHS261*crLHS69 - crLHS263*crLHS69 + crLHS272 - crLHS50*crLHS69;
const double crLHS274 = crLHS86*r_DN(2,1);
const double crLHS275 = crLHS105*r_DN(2,1);
const double crLHS276 = r_DN(2,1)*r_N[3];
const double crLHS277 = crLHS175*crLHS262;
const double crLHS278 = crLHS247*crLHS40;
const double crLHS279 = crLHS131*crLHS72;
const double crLHS280 = crLHS140*crLHS72;
const double crLHS281 = crLHS248*kappa + crLHS249*kappa + crLHS271 - crLHS5*dp_th_dt*r_N[2]*r_N[3];
const double crLHS282 = r_DN(3,0)*r_DN(3,0);
const double crLHS283 = r_DN(3,1)*r_DN(3,1);
const double crLHS284 = r_N[3]*r_N[3];
const double crLHS285 = crLHS284*crLHS5;
const double crLHS286 = crLHS65*tau_u;
const double crLHS287 = crLHS86*r_DN(3,0);
const double crLHS288 = crLHS150*crLHS6;
const double crLHS289 = crLHS67*crLHS8;
const double crLHS290 = crLHS288*crLHS75;
const double crLHS291 = crLHS76*r_N[3];
const double crLHS292 = crLHS24*crLHS291;
const double crLHS293 = crLHS152 + crLHS18*crLHS288 + crLHS20*crLHS289 + crLHS20*crLHS290 - crLHS20*crLHS292 - crLHS20*crLHS65;
const double crLHS294 = crLHS105*r_DN(3,0);
const double crLHS295 = crLHS230 + crLHS288*crLHS35 + crLHS289*crLHS37 + crLHS290*crLHS37 - crLHS292*crLHS37 - crLHS37*crLHS65;
const double crLHS296 = crLHS272 + crLHS288*crLHS52 + crLHS289*crLHS54 + crLHS290*crLHS54 - crLHS292*crLHS54 - crLHS54*crLHS65;
const double crLHS297 = gauss_weight*(crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_N[3]*tau_u - crLHS286 - crLHS291*crLHS78 - r_N[3]);
const double crLHS298 = crLHS22*crLHS285;
const double crLHS299 = crLHS284*sigma + crLHS288*crLHS67 + crLHS289*crLHS69 + crLHS290*crLHS69 - crLHS292*crLHS69 + crLHS298*crLHS6 - crLHS65*crLHS69;
const double crLHS300 = crLHS86*r_DN(3,1);
const double crLHS301 = crLHS105*r_DN(3,1);
const double crLHS302 = crLHS175*crLHS291;
const double crLHS303 = crLHS285*crLHS40;
rLHS(0,0)+=crLHS10*(crLHS0 + crLHS1);
rLHS(0,1)+=crLHS9*(-crLHS11*crLHS13 + crLHS20*r_DN(0,0) + r_DN(0,0)*r_N[0]);
rLHS(0,2)+=crLHS9*(-crLHS13*crLHS21 + crLHS20*r_DN(0,1) + r_DN(0,1)*r_N[0]);
rLHS(0,3)+=-crLHS12*crLHS25;
rLHS(0,4)+=crLHS28;
rLHS(0,5)+=crLHS9*(crLHS29 + crLHS32 + crLHS37*r_DN(0,0));
rLHS(0,6)+=crLHS9*(crLHS37*r_DN(0,1) + crLHS38 + crLHS39);
rLHS(0,7)+=crLHS43;
rLHS(0,8)+=crLHS46;
rLHS(0,9)+=crLHS9*(crLHS47 + crLHS49 + crLHS54*r_DN(0,0));
rLHS(0,10)+=crLHS9*(crLHS54*r_DN(0,1) + crLHS55 + crLHS56);
rLHS(0,11)+=crLHS58;
rLHS(0,12)+=crLHS61;
rLHS(0,13)+=crLHS9*(crLHS62 + crLHS64 + crLHS69*r_DN(0,0));
rLHS(0,14)+=crLHS9*(crLHS69*r_DN(0,1) + crLHS70 + crLHS71);
rLHS(0,15)+=crLHS73;
rLHS(1,0)+=crLHS79*r_DN(0,0);
rLHS(1,1)+=gauss_weight*(crLHS80*r_DN(0,0) + crLHS82*r_DN(0,1) + crLHS85*crLHS87 + crLHS94);
rLHS(1,2)+=gauss_weight*(crLHS100*crLHS87 + crLHS95*r_DN(0,0) + crLHS97*r_DN(0,1));
rLHS(1,3)+=-crLHS104*crLHS106;
rLHS(1,4)+=gauss_weight*(-crLHS107 - crLHS108*crLHS29 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(1,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,0)*r_N[0]*tau_u - crLHS74*r_DN(1,0));
rLHS(1,5)+=gauss_weight*(crLHS109*r_DN(0,0) + crLHS111*r_DN(0,1) + crLHS114*crLHS87 + crLHS118);
rLHS(1,6)+=gauss_weight*(crLHS119*r_DN(0,0) + crLHS121*r_DN(0,1) + crLHS123*crLHS87);
rLHS(1,7)+=-crLHS106*crLHS125;
rLHS(1,8)+=gauss_weight*(-crLHS108*crLHS47 - crLHS126 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(2,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,0)*r_N[0]*tau_u - crLHS74*r_DN(2,0));
rLHS(1,9)+=gauss_weight*(crLHS127*r_DN(0,0) + crLHS129*r_DN(0,1) + crLHS132*crLHS87 + crLHS136);
rLHS(1,10)+=gauss_weight*(crLHS137*r_DN(0,0) + crLHS139*r_DN(0,1) + crLHS141*crLHS87);
rLHS(1,11)+=-crLHS106*crLHS143;
rLHS(1,12)+=gauss_weight*(-crLHS108*crLHS62 - crLHS144 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(3,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,0)*r_N[0]*tau_u - crLHS74*r_DN(3,0));
rLHS(1,13)+=gauss_weight*(crLHS145*r_DN(0,0) + crLHS147*r_DN(0,1) + crLHS149*crLHS87 + crLHS153);
rLHS(1,14)+=gauss_weight*(crLHS154*r_DN(0,0) + crLHS156*r_DN(0,1) + crLHS157*crLHS87);
rLHS(1,15)+=-crLHS106*crLHS159;
rLHS(2,0)+=crLHS79*r_DN(0,1);
rLHS(2,1)+=gauss_weight*(crLHS160*r_DN(0,1) + crLHS161*crLHS85 + crLHS82*r_DN(0,0));
rLHS(2,2)+=gauss_weight*(crLHS100*crLHS161 + crLHS162*r_DN(0,1) + crLHS94 + crLHS97*r_DN(0,0));
rLHS(2,3)+=-crLHS104*crLHS163;
rLHS(2,4)+=gauss_weight*(-crLHS108*crLHS38 - crLHS164 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(1,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,1)*r_N[0]*tau_u - crLHS74*r_DN(1,1));
rLHS(2,5)+=gauss_weight*(crLHS111*r_DN(0,0) + crLHS114*crLHS161 + crLHS165*r_DN(0,1));
rLHS(2,6)+=gauss_weight*(crLHS118 + crLHS121*r_DN(0,0) + crLHS123*crLHS161 + crLHS166*r_DN(0,1));
rLHS(2,7)+=-crLHS125*crLHS163;
rLHS(2,8)+=gauss_weight*(-crLHS108*crLHS55 - crLHS167 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(2,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,1)*r_N[0]*tau_u - crLHS74*r_DN(2,1));
rLHS(2,9)+=gauss_weight*(crLHS129*r_DN(0,0) + crLHS132*crLHS161 + crLHS168*r_DN(0,1));
rLHS(2,10)+=gauss_weight*(crLHS136 + crLHS139*r_DN(0,0) + crLHS141*crLHS161 + crLHS169*r_DN(0,1));
rLHS(2,11)+=-crLHS143*crLHS163;
rLHS(2,12)+=gauss_weight*(-crLHS108*crLHS70 - crLHS170 + crLHS18*crLHS2*crLHS5*crLHS6*gamma*p_th*r_DN(3,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,1)*r_N[0]*tau_u - crLHS74*r_DN(3,1));
rLHS(2,13)+=gauss_weight*(crLHS147*r_DN(0,0) + crLHS149*crLHS161 + crLHS171*r_DN(0,1));
rLHS(2,14)+=gauss_weight*(crLHS153 + crLHS156*r_DN(0,0) + crLHS157*crLHS161 + crLHS172*r_DN(0,1));
rLHS(2,15)+=-crLHS159*crLHS163;
rLHS(3,0)+=0;
rLHS(3,1)+=crLHS173*crLHS83;
rLHS(3,2)+=crLHS173*crLHS98;
rLHS(3,3)+=-gauss_weight*(-crLHS0*kappa - crLHS1*kappa - crLHS103*crLHS89 + crLHS12*crLHS5*dp_th_dt - crLHS174*crLHS176 + crLHS174*crLHS18*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS174*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[0]*tau_t + crLHS174*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS88);
rLHS(3,4)+=0;
rLHS(3,5)+=crLHS177;
rLHS(3,6)+=crLHS178;
rLHS(3,7)+=-gauss_weight*(-crLHS124*crLHS89 - crLHS176*crLHS179 + crLHS179*crLHS18*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS179*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[0]*tau_t + crLHS179*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS180);
rLHS(3,8)+=0;
rLHS(3,9)+=crLHS181;
rLHS(3,10)+=crLHS182;
rLHS(3,11)+=-gauss_weight*(-crLHS142*crLHS89 - crLHS176*crLHS183 + crLHS18*crLHS183*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS183*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[0]*tau_t + crLHS183*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS184);
rLHS(3,12)+=0;
rLHS(3,13)+=crLHS185;
rLHS(3,14)+=crLHS186;
rLHS(3,15)+=-gauss_weight*(-crLHS158*crLHS89 - crLHS176*crLHS187 + crLHS18*crLHS187*crLHS2*crLHS23*gamma*p_th*tau_t + crLHS187*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[0]*tau_t + crLHS187*crLHS23*dp_th_dt*r_N[0]*tau_t - crLHS188);
rLHS(4,0)+=crLHS28;
rLHS(4,1)+=crLHS9*(crLHS107 + crLHS20*r_DN(1,0) + crLHS32);
rLHS(4,2)+=crLHS9*(crLHS164 + crLHS20*r_DN(1,1) + crLHS39);
rLHS(4,3)+=crLHS43;
rLHS(4,4)+=crLHS10*(crLHS189 + crLHS190);
rLHS(4,5)+=crLHS9*(-crLHS11*crLHS192 + crLHS37*r_DN(1,0) + r_DN(1,0)*r_N[1]);
rLHS(4,6)+=crLHS9*(-crLHS192*crLHS21 + crLHS37*r_DN(1,1) + r_DN(1,1)*r_N[1]);
rLHS(4,7)+=-crLHS191*crLHS25;
rLHS(4,8)+=crLHS195;
rLHS(4,9)+=crLHS9*(crLHS196 + crLHS198 + crLHS54*r_DN(1,0));
rLHS(4,10)+=crLHS9*(crLHS199 + crLHS200 + crLHS54*r_DN(1,1));
rLHS(4,11)+=crLHS202;
rLHS(4,12)+=crLHS205;
rLHS(4,13)+=crLHS9*(crLHS206 + crLHS208 + crLHS69*r_DN(1,0));
rLHS(4,14)+=crLHS9*(crLHS209 + crLHS210 + crLHS69*r_DN(1,1));
rLHS(4,15)+=crLHS211;
rLHS(5,0)+=gauss_weight*(-crLHS107*crLHS108 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(0,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,0)*r_N[1]*tau_u - crLHS212*r_DN(0,0) - crLHS29);
rLHS(5,1)+=gauss_weight*(crLHS213*crLHS85 + crLHS219 + crLHS80*r_DN(1,0) + crLHS82*r_DN(1,1));
rLHS(5,2)+=gauss_weight*(crLHS100*crLHS213 + crLHS95*r_DN(1,0) + crLHS97*r_DN(1,1));
rLHS(5,3)+=-crLHS104*crLHS220;
rLHS(5,4)+=crLHS221*r_DN(1,0);
rLHS(5,5)+=gauss_weight*(crLHS109*r_DN(1,0) + crLHS111*r_DN(1,1) + crLHS114*crLHS213 + crLHS223);
rLHS(5,6)+=gauss_weight*(crLHS119*r_DN(1,0) + crLHS121*r_DN(1,1) + crLHS123*crLHS213);
rLHS(5,7)+=-crLHS125*crLHS220;
rLHS(5,8)+=gauss_weight*(-crLHS108*crLHS196 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(2,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,0)*r_N[1]*tau_u - crLHS212*r_DN(2,0) - crLHS224);
rLHS(5,9)+=gauss_weight*(crLHS127*r_DN(1,0) + crLHS129*r_DN(1,1) + crLHS132*crLHS213 + crLHS227);
rLHS(5,10)+=gauss_weight*(crLHS137*r_DN(1,0) + crLHS139*r_DN(1,1) + crLHS141*crLHS213);
rLHS(5,11)+=-crLHS143*crLHS220;
rLHS(5,12)+=gauss_weight*(-crLHS108*crLHS206 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(3,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,0)*r_N[1]*tau_u - crLHS212*r_DN(3,0) - crLHS228);
rLHS(5,13)+=gauss_weight*(crLHS145*r_DN(1,0) + crLHS147*r_DN(1,1) + crLHS149*crLHS213 + crLHS231);
rLHS(5,14)+=gauss_weight*(crLHS154*r_DN(1,0) + crLHS156*r_DN(1,1) + crLHS157*crLHS213);
rLHS(5,15)+=-crLHS159*crLHS220;
rLHS(6,0)+=gauss_weight*(-crLHS108*crLHS164 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(0,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,1)*r_N[1]*tau_u - crLHS212*r_DN(0,1) - crLHS38);
rLHS(6,1)+=gauss_weight*(crLHS160*r_DN(1,1) + crLHS232*crLHS85 + crLHS82*r_DN(1,0));
rLHS(6,2)+=gauss_weight*(crLHS100*crLHS232 + crLHS162*r_DN(1,1) + crLHS219 + crLHS97*r_DN(1,0));
rLHS(6,3)+=-crLHS104*crLHS233;
rLHS(6,4)+=crLHS221*r_DN(1,1);
rLHS(6,5)+=gauss_weight*(crLHS111*r_DN(1,0) + crLHS114*crLHS232 + crLHS165*r_DN(1,1));
rLHS(6,6)+=gauss_weight*(crLHS121*r_DN(1,0) + crLHS123*crLHS232 + crLHS166*r_DN(1,1) + crLHS223);
rLHS(6,7)+=-crLHS125*crLHS233;
rLHS(6,8)+=gauss_weight*(-crLHS108*crLHS199 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(2,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,1)*r_N[1]*tau_u - crLHS212*r_DN(2,1) - crLHS234);
rLHS(6,9)+=gauss_weight*(crLHS129*r_DN(1,0) + crLHS132*crLHS232 + crLHS168*r_DN(1,1));
rLHS(6,10)+=gauss_weight*(crLHS139*r_DN(1,0) + crLHS141*crLHS232 + crLHS169*r_DN(1,1) + crLHS227);
rLHS(6,11)+=-crLHS143*crLHS233;
rLHS(6,12)+=gauss_weight*(-crLHS108*crLHS209 + crLHS2*crLHS35*crLHS5*crLHS6*gamma*p_th*r_DN(3,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,1)*r_N[1]*tau_u - crLHS212*r_DN(3,1) - crLHS235);
rLHS(6,13)+=gauss_weight*(crLHS147*r_DN(1,0) + crLHS149*crLHS232 + crLHS171*r_DN(1,1));
rLHS(6,14)+=gauss_weight*(crLHS156*r_DN(1,0) + crLHS157*crLHS232 + crLHS172*r_DN(1,1) + crLHS231);
rLHS(6,15)+=-crLHS159*crLHS233;
rLHS(7,0)+=0;
rLHS(7,1)+=crLHS177;
rLHS(7,2)+=crLHS178;
rLHS(7,3)+=-gauss_weight*(-crLHS103*crLHS115 + crLHS174*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS174*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[1]*tau_t + crLHS174*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS174*crLHS236 - crLHS180);
rLHS(7,4)+=0;
rLHS(7,5)+=crLHS237*crLHS83;
rLHS(7,6)+=crLHS237*crLHS98;
rLHS(7,7)+=-gauss_weight*(-crLHS115*crLHS124 + crLHS179*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS179*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[1]*tau_t + crLHS179*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS179*crLHS236 - crLHS189*kappa - crLHS190*kappa + crLHS191*crLHS5*dp_th_dt - crLHS222);
rLHS(7,8)+=0;
rLHS(7,9)+=crLHS238;
rLHS(7,10)+=crLHS239;
rLHS(7,11)+=-gauss_weight*(-crLHS115*crLHS142 + crLHS183*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS183*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[1]*tau_t + crLHS183*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS183*crLHS236 - crLHS240);
rLHS(7,12)+=0;
rLHS(7,13)+=crLHS241;
rLHS(7,14)+=crLHS242;
rLHS(7,15)+=-gauss_weight*(-crLHS115*crLHS158 + crLHS187*crLHS2*crLHS23*crLHS35*gamma*p_th*tau_t + crLHS187*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[1]*tau_t + crLHS187*crLHS23*dp_th_dt*r_N[1]*tau_t - crLHS187*crLHS236 - crLHS243);
rLHS(8,0)+=crLHS46;
rLHS(8,1)+=crLHS9*(crLHS126 + crLHS20*r_DN(2,0) + crLHS49);
rLHS(8,2)+=crLHS9*(crLHS167 + crLHS20*r_DN(2,1) + crLHS56);
rLHS(8,3)+=crLHS58;
rLHS(8,4)+=crLHS195;
rLHS(8,5)+=crLHS9*(crLHS198 + crLHS224 + crLHS37*r_DN(2,0));
rLHS(8,6)+=crLHS9*(crLHS200 + crLHS234 + crLHS37*r_DN(2,1));
rLHS(8,7)+=crLHS202;
rLHS(8,8)+=crLHS10*(crLHS244 + crLHS245);
rLHS(8,9)+=crLHS9*(-crLHS11*crLHS247 + crLHS54*r_DN(2,0) + r_DN(2,0)*r_N[2]);
rLHS(8,10)+=crLHS9*(-crLHS21*crLHS247 + crLHS54*r_DN(2,1) + r_DN(2,1)*r_N[2]);
rLHS(8,11)+=-crLHS246*crLHS25;
rLHS(8,12)+=crLHS250;
rLHS(8,13)+=crLHS9*(crLHS251 + crLHS253 + crLHS69*r_DN(2,0));
rLHS(8,14)+=crLHS9*(crLHS254 + crLHS255 + crLHS69*r_DN(2,1));
rLHS(8,15)+=crLHS256;
rLHS(9,0)+=gauss_weight*(-crLHS108*crLHS126 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(0,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,0)*r_N[2]*tau_u - crLHS257*r_DN(0,0) - crLHS47);
rLHS(9,1)+=gauss_weight*(crLHS258*crLHS85 + crLHS264 + crLHS80*r_DN(2,0) + crLHS82*r_DN(2,1));
rLHS(9,2)+=gauss_weight*(crLHS100*crLHS258 + crLHS95*r_DN(2,0) + crLHS97*r_DN(2,1));
rLHS(9,3)+=-crLHS104*crLHS265;
rLHS(9,4)+=gauss_weight*(-crLHS108*crLHS224 - crLHS196 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(1,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,0)*r_N[2]*tau_u - crLHS257*r_DN(1,0));
rLHS(9,5)+=gauss_weight*(crLHS109*r_DN(2,0) + crLHS111*r_DN(2,1) + crLHS114*crLHS258 + crLHS266);
rLHS(9,6)+=gauss_weight*(crLHS119*r_DN(2,0) + crLHS121*r_DN(2,1) + crLHS123*crLHS258);
rLHS(9,7)+=-crLHS125*crLHS265;
rLHS(9,8)+=crLHS267*r_DN(2,0);
rLHS(9,9)+=gauss_weight*(crLHS127*r_DN(2,0) + crLHS129*r_DN(2,1) + crLHS132*crLHS258 + crLHS269);
rLHS(9,10)+=gauss_weight*(crLHS137*r_DN(2,0) + crLHS139*r_DN(2,1) + crLHS141*crLHS258);
rLHS(9,11)+=-crLHS143*crLHS265;
rLHS(9,12)+=gauss_weight*(-crLHS108*crLHS251 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(3,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,0)*r_N[2]*tau_u - crLHS257*r_DN(3,0) - crLHS270);
rLHS(9,13)+=gauss_weight*(crLHS145*r_DN(2,0) + crLHS147*r_DN(2,1) + crLHS149*crLHS258 + crLHS273);
rLHS(9,14)+=gauss_weight*(crLHS154*r_DN(2,0) + crLHS156*r_DN(2,1) + crLHS157*crLHS258);
rLHS(9,15)+=-crLHS159*crLHS265;
rLHS(10,0)+=gauss_weight*(-crLHS108*crLHS167 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(0,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,1)*r_N[2]*tau_u - crLHS257*r_DN(0,1) - crLHS55);
rLHS(10,1)+=gauss_weight*(crLHS160*r_DN(2,1) + crLHS274*crLHS85 + crLHS82*r_DN(2,0));
rLHS(10,2)+=gauss_weight*(crLHS100*crLHS274 + crLHS162*r_DN(2,1) + crLHS264 + crLHS97*r_DN(2,0));
rLHS(10,3)+=-crLHS104*crLHS275;
rLHS(10,4)+=gauss_weight*(-crLHS108*crLHS234 - crLHS199 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(1,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,1)*r_N[2]*tau_u - crLHS257*r_DN(1,1));
rLHS(10,5)+=gauss_weight*(crLHS111*r_DN(2,0) + crLHS114*crLHS274 + crLHS165*r_DN(2,1));
rLHS(10,6)+=gauss_weight*(crLHS121*r_DN(2,0) + crLHS123*crLHS274 + crLHS166*r_DN(2,1) + crLHS266);
rLHS(10,7)+=-crLHS125*crLHS275;
rLHS(10,8)+=crLHS267*r_DN(2,1);
rLHS(10,9)+=gauss_weight*(crLHS129*r_DN(2,0) + crLHS132*crLHS274 + crLHS168*r_DN(2,1));
rLHS(10,10)+=gauss_weight*(crLHS139*r_DN(2,0) + crLHS141*crLHS274 + crLHS169*r_DN(2,1) + crLHS269);
rLHS(10,11)+=-crLHS143*crLHS275;
rLHS(10,12)+=gauss_weight*(-crLHS108*crLHS254 + crLHS2*crLHS5*crLHS52*crLHS6*gamma*p_th*r_DN(3,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(3,1)*r_N[2]*tau_u - crLHS257*r_DN(3,1) - crLHS276);
rLHS(10,13)+=gauss_weight*(crLHS147*r_DN(2,0) + crLHS149*crLHS274 + crLHS171*r_DN(2,1));
rLHS(10,14)+=gauss_weight*(crLHS156*r_DN(2,0) + crLHS157*crLHS274 + crLHS172*r_DN(2,1) + crLHS273);
rLHS(10,15)+=-crLHS159*crLHS275;
rLHS(11,0)+=0;
rLHS(11,1)+=crLHS181;
rLHS(11,2)+=crLHS182;
rLHS(11,3)+=-gauss_weight*(-crLHS103*crLHS133 + crLHS174*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS174*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[2]*tau_t + crLHS174*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS174*crLHS277 - crLHS184);
rLHS(11,4)+=0;
rLHS(11,5)+=crLHS238;
rLHS(11,6)+=crLHS239;
rLHS(11,7)+=-gauss_weight*(-crLHS124*crLHS133 + crLHS179*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS179*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[2]*tau_t + crLHS179*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS179*crLHS277 - crLHS240);
rLHS(11,8)+=0;
rLHS(11,9)+=crLHS278*crLHS83;
rLHS(11,10)+=crLHS278*crLHS98;
rLHS(11,11)+=-gauss_weight*(-crLHS133*crLHS142 + crLHS183*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS183*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[2]*tau_t + crLHS183*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS183*crLHS277 - crLHS244*kappa - crLHS245*kappa + crLHS246*crLHS5*dp_th_dt - crLHS268);
rLHS(11,12)+=0;
rLHS(11,13)+=crLHS279;
rLHS(11,14)+=crLHS280;
rLHS(11,15)+=-gauss_weight*(-crLHS133*crLHS158 + crLHS187*crLHS2*crLHS23*crLHS52*gamma*p_th*tau_t + crLHS187*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[2]*tau_t + crLHS187*crLHS23*dp_th_dt*r_N[2]*tau_t - crLHS187*crLHS277 - crLHS281);
rLHS(12,0)+=crLHS61;
rLHS(12,1)+=crLHS9*(crLHS144 + crLHS20*r_DN(3,0) + crLHS64);
rLHS(12,2)+=crLHS9*(crLHS170 + crLHS20*r_DN(3,1) + crLHS71);
rLHS(12,3)+=crLHS73;
rLHS(12,4)+=crLHS205;
rLHS(12,5)+=crLHS9*(crLHS208 + crLHS228 + crLHS37*r_DN(3,0));
rLHS(12,6)+=crLHS9*(crLHS210 + crLHS235 + crLHS37*r_DN(3,1));
rLHS(12,7)+=crLHS211;
rLHS(12,8)+=crLHS250;
rLHS(12,9)+=crLHS9*(crLHS253 + crLHS270 + crLHS54*r_DN(3,0));
rLHS(12,10)+=crLHS9*(crLHS255 + crLHS276 + crLHS54*r_DN(3,1));
rLHS(12,11)+=crLHS256;
rLHS(12,12)+=crLHS10*(crLHS282 + crLHS283);
rLHS(12,13)+=crLHS9*(-crLHS11*crLHS285 + crLHS69*r_DN(3,0) + r_DN(3,0)*r_N[3]);
rLHS(12,14)+=crLHS9*(-crLHS21*crLHS285 + crLHS69*r_DN(3,1) + r_DN(3,1)*r_N[3]);
rLHS(12,15)+=-crLHS25*crLHS284;
rLHS(13,0)+=gauss_weight*(-crLHS108*crLHS144 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(0,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,0)*r_N[3]*tau_u - crLHS286*r_DN(0,0) - crLHS62);
rLHS(13,1)+=gauss_weight*(crLHS287*crLHS85 + crLHS293 + crLHS80*r_DN(3,0) + crLHS82*r_DN(3,1));
rLHS(13,2)+=gauss_weight*(crLHS100*crLHS287 + crLHS95*r_DN(3,0) + crLHS97*r_DN(3,1));
rLHS(13,3)+=-crLHS104*crLHS294;
rLHS(13,4)+=gauss_weight*(-crLHS108*crLHS228 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(1,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,0)*r_N[3]*tau_u - crLHS206 - crLHS286*r_DN(1,0));
rLHS(13,5)+=gauss_weight*(crLHS109*r_DN(3,0) + crLHS111*r_DN(3,1) + crLHS114*crLHS287 + crLHS295);
rLHS(13,6)+=gauss_weight*(crLHS119*r_DN(3,0) + crLHS121*r_DN(3,1) + crLHS123*crLHS287);
rLHS(13,7)+=-crLHS125*crLHS294;
rLHS(13,8)+=gauss_weight*(-crLHS108*crLHS270 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(2,0)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,0)*r_N[3]*tau_u - crLHS251 - crLHS286*r_DN(2,0));
rLHS(13,9)+=gauss_weight*(crLHS127*r_DN(3,0) + crLHS129*r_DN(3,1) + crLHS132*crLHS287 + crLHS296);
rLHS(13,10)+=gauss_weight*(crLHS137*r_DN(3,0) + crLHS139*r_DN(3,1) + crLHS141*crLHS287);
rLHS(13,11)+=-crLHS143*crLHS294;
rLHS(13,12)+=crLHS297*r_DN(3,0);
rLHS(13,13)+=gauss_weight*(crLHS145*r_DN(3,0) + crLHS147*r_DN(3,1) + crLHS149*crLHS287 + crLHS299);
rLHS(13,14)+=gauss_weight*(crLHS154*r_DN(3,0) + crLHS156*r_DN(3,1) + crLHS157*crLHS287);
rLHS(13,15)+=-crLHS159*crLHS294;
rLHS(14,0)+=gauss_weight*(-crLHS108*crLHS170 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(0,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(0,1)*r_N[3]*tau_u - crLHS286*r_DN(0,1) - crLHS70);
rLHS(14,1)+=gauss_weight*(crLHS160*r_DN(3,1) + crLHS300*crLHS85 + crLHS82*r_DN(3,0));
rLHS(14,2)+=gauss_weight*(crLHS100*crLHS300 + crLHS162*r_DN(3,1) + crLHS293 + crLHS97*r_DN(3,0));
rLHS(14,3)+=-crLHS104*crLHS301;
rLHS(14,4)+=gauss_weight*(-crLHS108*crLHS235 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(1,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(1,1)*r_N[3]*tau_u - crLHS209 - crLHS286*r_DN(1,1));
rLHS(14,5)+=gauss_weight*(crLHS111*r_DN(3,0) + crLHS114*crLHS300 + crLHS165*r_DN(3,1));
rLHS(14,6)+=gauss_weight*(crLHS121*r_DN(3,0) + crLHS123*crLHS300 + crLHS166*r_DN(3,1) + crLHS295);
rLHS(14,7)+=-crLHS125*crLHS301;
rLHS(14,8)+=gauss_weight*(-crLHS108*crLHS276 + crLHS2*crLHS5*crLHS6*crLHS67*gamma*p_th*r_DN(2,1)*tau_u + crLHS2*crLHS5*crLHS6*crLHS75*gamma*p_th*r_DN(2,1)*r_N[3]*tau_u - crLHS254 - crLHS286*r_DN(2,1));
rLHS(14,9)+=gauss_weight*(crLHS129*r_DN(3,0) + crLHS132*crLHS300 + crLHS168*r_DN(3,1));
rLHS(14,10)+=gauss_weight*(crLHS139*r_DN(3,0) + crLHS141*crLHS300 + crLHS169*r_DN(3,1) + crLHS296);
rLHS(14,11)+=-crLHS143*crLHS301;
rLHS(14,12)+=crLHS297*r_DN(3,1);
rLHS(14,13)+=gauss_weight*(crLHS147*r_DN(3,0) + crLHS149*crLHS300 + crLHS171*r_DN(3,1));
rLHS(14,14)+=gauss_weight*(crLHS156*r_DN(3,0) + crLHS157*crLHS300 + crLHS172*r_DN(3,1) + crLHS299);
rLHS(14,15)+=-crLHS159*crLHS301;
rLHS(15,0)+=0;
rLHS(15,1)+=crLHS185;
rLHS(15,2)+=crLHS186;
rLHS(15,3)+=-gauss_weight*(-crLHS103*crLHS150 + crLHS174*crLHS2*crLHS23*crLHS67*gamma*p_th*tau_t + crLHS174*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[3]*tau_t + crLHS174*crLHS23*dp_th_dt*r_N[3]*tau_t - crLHS174*crLHS302 - crLHS188);
rLHS(15,4)+=0;
rLHS(15,5)+=crLHS241;
rLHS(15,6)+=crLHS242;
rLHS(15,7)+=-gauss_weight*(-crLHS124*crLHS150 + crLHS179*crLHS2*crLHS23*crLHS67*gamma*p_th*tau_t + crLHS179*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[3]*tau_t + crLHS179*crLHS23*dp_th_dt*r_N[3]*tau_t - crLHS179*crLHS302 - crLHS243);
rLHS(15,8)+=0;
rLHS(15,9)+=crLHS279;
rLHS(15,10)+=crLHS280;
rLHS(15,11)+=-gauss_weight*(-crLHS142*crLHS150 + crLHS183*crLHS2*crLHS23*crLHS67*gamma*p_th*tau_t + crLHS183*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[3]*tau_t + crLHS183*crLHS23*dp_th_dt*r_N[3]*tau_t - crLHS183*crLHS302 - crLHS281);
rLHS(15,12)+=0;
rLHS(15,13)+=crLHS303*crLHS83;
rLHS(15,14)+=crLHS303*crLHS98;
rLHS(15,15)+=-gauss_weight*(-crLHS150*crLHS158 + crLHS187*crLHS2*crLHS23*crLHS67*gamma*p_th*tau_t + crLHS187*crLHS2*crLHS23*crLHS75*gamma*p_th*r_N[3]*tau_t + crLHS187*crLHS23*dp_th_dt*r_N[3]*tau_t - crLHS187*crLHS302 - crLHS282*kappa - crLHS283*kappa + crLHS284*crLHS5*dp_th_dt - crLHS298);

}

template <>
void LowMachNavierStokes< LowMachNavierStokesData<3,4> >::ComputeGaussPointLHSContribution(
    LowMachNavierStokesData<3,4>& rData,
    MatrixType& rLHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;
    const double sigma = rData.Resistance;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_C = rData.C;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;

    // Nodal data
    const auto& r_u = rData.Velocity;
    const auto& r_t = rData.Temperature;
    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double,2,3> lin_u_conv = rData.Velocity - rData.MeshVelocity;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add LHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crLHS0 = r_DN(0,0)*r_DN(0,0);
const double crLHS1 = r_DN(0,1)*r_DN(0,1);
const double crLHS2 = r_DN(0,2)*r_DN(0,2);
const double crLHS3 = 1.0/(gamma - 1.0);
const double crLHS4 = crLHS3*gamma*p_th;
const double crLHS5 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2] + r_N[3]*r_t_lin[3];
const double crLHS6 = 1.0/crLHS5;
const double crLHS7 = 1.0/c_p;
const double crLHS8 = crLHS6*crLHS7;
const double crLHS9 = crLHS4*crLHS8;
const double crLHS10 = crLHS9*gauss_weight;
const double crLHS11 = crLHS10*tau_u;
const double crLHS12 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2] + r_DN(3,0)*r_t_lin[3];
const double crLHS13 = r_N[0]*r_N[0];
const double crLHS14 = crLHS13*crLHS6;
const double crLHS15 = r_N[0]*sigma;
const double crLHS16 = bdf0*r_N[0];
const double crLHS17 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2] + lin_u_conv(3,0)*r_N[3];
const double crLHS18 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2] + lin_u_conv(3,1)*r_N[3];
const double crLHS19 = lin_u_conv(0,2)*r_N[0] + lin_u_conv(1,2)*r_N[1] + lin_u_conv(2,2)*r_N[2] + lin_u_conv(3,2)*r_N[3];
const double crLHS20 = crLHS17*r_DN(0,0) + crLHS18*r_DN(0,1) + crLHS19*r_DN(0,2);
const double crLHS21 = crLHS4*(crLHS16 + crLHS20);
const double crLHS22 = tau_u*(crLHS15 + crLHS21*crLHS8);
const double crLHS23 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2] + r_DN(3,1)*r_t_lin[3];
const double crLHS24 = r_DN(0,2)*r_t_lin[0] + r_DN(1,2)*r_t_lin[1] + r_DN(2,2)*r_t_lin[2] + r_DN(3,2)*r_t_lin[3];
const double crLHS25 = bdf0*crLHS4;
const double crLHS26 = 1.0/(crLHS5*crLHS5);
const double crLHS27 = crLHS26*crLHS7;
const double crLHS28 = crLHS25*crLHS27*gauss_weight;
const double crLHS29 = r_DN(0,0)*r_DN(1,0);
const double crLHS30 = r_DN(0,1)*r_DN(1,1);
const double crLHS31 = r_DN(0,2)*r_DN(1,2);
const double crLHS32 = crLHS11*(crLHS29 + crLHS30 + crLHS31);
const double crLHS33 = r_DN(1,0)*r_N[0];
const double crLHS34 = crLHS6*r_N[0];
const double crLHS35 = crLHS34*r_N[1];
const double crLHS36 = -crLHS12*crLHS35;
const double crLHS37 = r_N[1]*sigma;
const double crLHS38 = bdf0*r_N[1];
const double crLHS39 = crLHS17*r_DN(1,0) + crLHS18*r_DN(1,1) + crLHS19*r_DN(1,2);
const double crLHS40 = crLHS4*(crLHS38 + crLHS39);
const double crLHS41 = tau_u*(crLHS37 + crLHS40*crLHS8);
const double crLHS42 = r_DN(1,1)*r_N[0];
const double crLHS43 = -crLHS23*crLHS35;
const double crLHS44 = r_DN(1,2)*r_N[0];
const double crLHS45 = -crLHS24*crLHS35;
const double crLHS46 = crLHS4*gauss_weight;
const double crLHS47 = crLHS46*r_N[1];
const double crLHS48 = crLHS16*crLHS27;
const double crLHS49 = -crLHS47*crLHS48;
const double crLHS50 = r_DN(0,0)*r_DN(2,0);
const double crLHS51 = r_DN(0,1)*r_DN(2,1);
const double crLHS52 = r_DN(0,2)*r_DN(2,2);
const double crLHS53 = crLHS11*(crLHS50 + crLHS51 + crLHS52);
const double crLHS54 = r_DN(2,0)*r_N[0];
const double crLHS55 = crLHS34*r_N[2];
const double crLHS56 = -crLHS12*crLHS55;
const double crLHS57 = r_N[2]*sigma;
const double crLHS58 = bdf0*r_N[2];
const double crLHS59 = crLHS17*r_DN(2,0) + crLHS18*r_DN(2,1) + crLHS19*r_DN(2,2);
const double crLHS60 = crLHS4*(crLHS58 + crLHS59);
const double crLHS61 = tau_u*(crLHS57 + crLHS60*crLHS8);
const double crLHS62 = r_DN(2,1)*r_N[0];
const double crLHS63 = -crLHS23*crLHS55;
const double crLHS64 = r_DN(2,2)*r_N[0];
const double crLHS65 = -crLHS24*crLHS55;
const double crLHS66 = crLHS46*r_N[2];
const double crLHS67 = -crLHS48*crLHS66;
const double crLHS68 = r_DN(0,0)*r_DN(3,0);
const double crLHS69 = r_DN(0,1)*r_DN(3,1);
const double crLHS70 = r_DN(0,2)*r_DN(3,2);
const double crLHS71 = crLHS11*(crLHS68 + crLHS69 + crLHS70);
const double crLHS72 = r_DN(3,0)*r_N[0];
const double crLHS73 = crLHS34*r_N[3];
const double crLHS74 = -crLHS12*crLHS73;
const double crLHS75 = r_N[3]*sigma;
const double crLHS76 = bdf0*r_N[3];
const double crLHS77 = crLHS17*r_DN(3,0) + crLHS18*r_DN(3,1) + crLHS19*r_DN(3,2);
const double crLHS78 = crLHS4*(crLHS76 + crLHS77);
const double crLHS79 = tau_u*(crLHS75 + crLHS78*crLHS8);
const double crLHS80 = r_DN(3,1)*r_N[0];
const double crLHS81 = -crLHS23*crLHS73;
const double crLHS82 = r_DN(3,2)*r_N[0];
const double crLHS83 = -crLHS24*crLHS73;
const double crLHS84 = crLHS46*r_N[3];
const double crLHS85 = -crLHS48*crLHS84;
const double crLHS86 = crLHS15*tau_u;
const double crLHS87 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(0,2)*r_DN(0,2) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(1,2)*r_DN(1,2) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1) + lin_u_conv(2,2)*r_DN(2,2) + lin_u_conv(3,0)*r_DN(3,0) + lin_u_conv(3,1)*r_DN(3,1) + lin_u_conv(3,2)*r_DN(3,2);
const double crLHS88 = crLHS4*(crLHS12*crLHS17 + crLHS18*crLHS23 + crLHS19*crLHS24);
const double crLHS89 = crLHS88*r_N[0];
const double crLHS90 = crLHS27*tau_u;
const double crLHS91 = gauss_weight*(crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_N[0]*tau_u - crLHS86 - crLHS89*crLHS90 - r_N[0]);
const double crLHS92 = r_C(0,0)*r_DN(0,0) + r_C(0,3)*r_DN(0,1) + r_C(0,5)*r_DN(0,2);
const double crLHS93 = r_C(0,3)*r_DN(0,0);
const double crLHS94 = crLHS93 + r_C(3,3)*r_DN(0,1) + r_C(3,5)*r_DN(0,2);
const double crLHS95 = r_C(0,5)*r_DN(0,0);
const double crLHS96 = crLHS95 + r_C(3,5)*r_DN(0,1) + r_C(5,5)*r_DN(0,2);
const double crLHS97 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2] + r_DN(3,0)*r_t[3];
const double crLHS98 = crLHS34*crLHS97;
const double crLHS99 = -crLHS98 + r_DN(0,0);
const double crLHS100 = crLHS9*tau_c;
const double crLHS101 = crLHS100*r_DN(0,0);
const double crLHS102 = crLHS14*crLHS25;
const double crLHS103 = crLHS34*crLHS4;
const double crLHS104 = crLHS103*crLHS7;
const double crLHS105 = crLHS20*crLHS9;
const double crLHS106 = crLHS104*crLHS87;
const double crLHS107 = crLHS27*crLHS89;
const double crLHS108 = crLHS102*crLHS7 + crLHS104*crLHS20 + crLHS105*crLHS22 + crLHS106*crLHS22 - crLHS107*crLHS22 + crLHS13*sigma - crLHS15*crLHS22;
const double crLHS109 = crLHS93 + r_C(0,1)*r_DN(0,1) + r_C(0,4)*r_DN(0,2);
const double crLHS110 = r_C(1,3)*r_DN(0,1);
const double crLHS111 = crLHS110 + r_C(3,3)*r_DN(0,0) + r_C(3,4)*r_DN(0,2);
const double crLHS112 = r_C(3,5)*r_DN(0,0);
const double crLHS113 = r_C(4,5)*r_DN(0,2);
const double crLHS114 = crLHS112 + crLHS113 + r_C(1,5)*r_DN(0,1);
const double crLHS115 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2] + r_DN(3,1)*r_t[3];
const double crLHS116 = crLHS115*crLHS34;
const double crLHS117 = -crLHS116 + r_DN(0,1);
const double crLHS118 = crLHS95 + r_C(0,2)*r_DN(0,2) + r_C(0,4)*r_DN(0,1);
const double crLHS119 = r_C(3,4)*r_DN(0,1);
const double crLHS120 = crLHS112 + crLHS119 + r_C(2,3)*r_DN(0,2);
const double crLHS121 = r_C(2,5)*r_DN(0,2);
const double crLHS122 = crLHS121 + r_C(4,5)*r_DN(0,1) + r_C(5,5)*r_DN(0,0);
const double crLHS123 = r_DN(0,2)*r_t[0] + r_DN(1,2)*r_t[1] + r_DN(2,2)*r_t[2] + r_DN(3,2)*r_t[3];
const double crLHS124 = crLHS123*crLHS34;
const double crLHS125 = -crLHS124 + r_DN(0,2);
const double crLHS126 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0)) + r_N[3]*(r_u(3,0) - r_u_mesh(3,0));
const double crLHS127 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1)) + r_N[3]*(r_u(3,1) - r_u_mesh(3,1));
const double crLHS128 = r_N[0]*(r_u(0,2) - r_u_mesh(0,2)) + r_N[1]*(r_u(1,2) - r_u_mesh(1,2)) + r_N[2]*(r_u(2,2) - r_u_mesh(2,2)) + r_N[3]*(r_u(3,2) - r_u_mesh(3,2));
const double crLHS129 = crLHS126*r_DN(0,0) + crLHS127*r_DN(0,1) + crLHS128*r_DN(0,2);
const double crLHS130 = crLHS129 + crLHS16;
const double crLHS131 = crLHS27*crLHS46*tau_c;
const double crLHS132 = crLHS131*r_DN(0,0);
const double crLHS133 = r_DN(0,0)*r_N[1];
const double crLHS134 = crLHS88*crLHS90;
const double crLHS135 = r_C(0,0)*r_DN(1,0) + r_C(0,3)*r_DN(1,1) + r_C(0,5)*r_DN(1,2);
const double crLHS136 = r_C(0,3)*r_DN(1,0);
const double crLHS137 = crLHS136 + r_C(3,3)*r_DN(1,1) + r_C(3,5)*r_DN(1,2);
const double crLHS138 = r_C(0,5)*r_DN(1,0);
const double crLHS139 = crLHS138 + r_C(3,5)*r_DN(1,1) + r_C(5,5)*r_DN(1,2);
const double crLHS140 = crLHS6*r_N[1];
const double crLHS141 = crLHS140*crLHS97;
const double crLHS142 = -crLHS141 + r_DN(1,0);
const double crLHS143 = crLHS140*crLHS4;
const double crLHS144 = crLHS143*crLHS16;
const double crLHS145 = crLHS144*crLHS7 + crLHS15*r_N[1];
const double crLHS146 = crLHS104*crLHS39 + crLHS105*crLHS41 + crLHS106*crLHS41 - crLHS107*crLHS41 + crLHS145 - crLHS15*crLHS41;
const double crLHS147 = crLHS136 + r_C(0,1)*r_DN(1,1) + r_C(0,4)*r_DN(1,2);
const double crLHS148 = r_C(1,3)*r_DN(1,1);
const double crLHS149 = crLHS148 + r_C(3,3)*r_DN(1,0) + r_C(3,4)*r_DN(1,2);
const double crLHS150 = r_C(3,5)*r_DN(1,0);
const double crLHS151 = r_C(4,5)*r_DN(1,2);
const double crLHS152 = crLHS150 + crLHS151 + r_C(1,5)*r_DN(1,1);
const double crLHS153 = crLHS115*crLHS140;
const double crLHS154 = -crLHS153 + r_DN(1,1);
const double crLHS155 = crLHS138 + r_C(0,2)*r_DN(1,2) + r_C(0,4)*r_DN(1,1);
const double crLHS156 = r_C(3,4)*r_DN(1,1);
const double crLHS157 = crLHS150 + crLHS156 + r_C(2,3)*r_DN(1,2);
const double crLHS158 = r_C(2,5)*r_DN(1,2);
const double crLHS159 = crLHS158 + r_C(4,5)*r_DN(1,1) + r_C(5,5)*r_DN(1,0);
const double crLHS160 = crLHS123*crLHS140;
const double crLHS161 = -crLHS160 + r_DN(1,2);
const double crLHS162 = crLHS126*r_DN(1,0) + crLHS127*r_DN(1,1) + crLHS128*r_DN(1,2);
const double crLHS163 = crLHS162 + crLHS38;
const double crLHS164 = r_DN(0,0)*r_N[2];
const double crLHS165 = r_C(0,0)*r_DN(2,0) + r_C(0,3)*r_DN(2,1) + r_C(0,5)*r_DN(2,2);
const double crLHS166 = r_C(0,3)*r_DN(2,0);
const double crLHS167 = crLHS166 + r_C(3,3)*r_DN(2,1) + r_C(3,5)*r_DN(2,2);
const double crLHS168 = r_C(0,5)*r_DN(2,0);
const double crLHS169 = crLHS168 + r_C(3,5)*r_DN(2,1) + r_C(5,5)*r_DN(2,2);
const double crLHS170 = crLHS6*r_N[2];
const double crLHS171 = crLHS170*crLHS97;
const double crLHS172 = -crLHS171 + r_DN(2,0);
const double crLHS173 = crLHS170*crLHS4;
const double crLHS174 = crLHS16*crLHS173;
const double crLHS175 = crLHS15*r_N[2] + crLHS174*crLHS7;
const double crLHS176 = crLHS104*crLHS59 + crLHS105*crLHS61 + crLHS106*crLHS61 - crLHS107*crLHS61 - crLHS15*crLHS61 + crLHS175;
const double crLHS177 = crLHS166 + r_C(0,1)*r_DN(2,1) + r_C(0,4)*r_DN(2,2);
const double crLHS178 = r_C(1,3)*r_DN(2,1);
const double crLHS179 = crLHS178 + r_C(3,3)*r_DN(2,0) + r_C(3,4)*r_DN(2,2);
const double crLHS180 = r_C(3,5)*r_DN(2,0);
const double crLHS181 = r_C(4,5)*r_DN(2,2);
const double crLHS182 = crLHS180 + crLHS181 + r_C(1,5)*r_DN(2,1);
const double crLHS183 = crLHS115*crLHS170;
const double crLHS184 = -crLHS183 + r_DN(2,1);
const double crLHS185 = crLHS168 + r_C(0,2)*r_DN(2,2) + r_C(0,4)*r_DN(2,1);
const double crLHS186 = r_C(3,4)*r_DN(2,1);
const double crLHS187 = crLHS180 + crLHS186 + r_C(2,3)*r_DN(2,2);
const double crLHS188 = r_C(2,5)*r_DN(2,2);
const double crLHS189 = crLHS188 + r_C(4,5)*r_DN(2,1) + r_C(5,5)*r_DN(2,0);
const double crLHS190 = crLHS123*crLHS170;
const double crLHS191 = -crLHS190 + r_DN(2,2);
const double crLHS192 = crLHS126*r_DN(2,0) + crLHS127*r_DN(2,1) + crLHS128*r_DN(2,2);
const double crLHS193 = crLHS192 + crLHS58;
const double crLHS194 = r_DN(0,0)*r_N[3];
const double crLHS195 = r_C(0,0)*r_DN(3,0) + r_C(0,3)*r_DN(3,1) + r_C(0,5)*r_DN(3,2);
const double crLHS196 = r_C(0,3)*r_DN(3,0);
const double crLHS197 = crLHS196 + r_C(3,3)*r_DN(3,1) + r_C(3,5)*r_DN(3,2);
const double crLHS198 = r_C(0,5)*r_DN(3,0);
const double crLHS199 = crLHS198 + r_C(3,5)*r_DN(3,1) + r_C(5,5)*r_DN(3,2);
const double crLHS200 = crLHS6*r_N[3];
const double crLHS201 = -crLHS200*crLHS97 + r_DN(3,0);
const double crLHS202 = crLHS200*crLHS4;
const double crLHS203 = crLHS16*crLHS202;
const double crLHS204 = crLHS15*r_N[3] + crLHS203*crLHS7;
const double crLHS205 = crLHS104*crLHS77 + crLHS105*crLHS79 + crLHS106*crLHS79 - crLHS107*crLHS79 - crLHS15*crLHS79 + crLHS204;
const double crLHS206 = crLHS196 + r_C(0,1)*r_DN(3,1) + r_C(0,4)*r_DN(3,2);
const double crLHS207 = r_C(1,3)*r_DN(3,1);
const double crLHS208 = crLHS207 + r_C(3,3)*r_DN(3,0) + r_C(3,4)*r_DN(3,2);
const double crLHS209 = r_C(3,5)*r_DN(3,0);
const double crLHS210 = r_C(4,5)*r_DN(3,2);
const double crLHS211 = crLHS209 + crLHS210 + r_C(1,5)*r_DN(3,1);
const double crLHS212 = -crLHS115*crLHS200 + r_DN(3,1);
const double crLHS213 = crLHS198 + r_C(0,2)*r_DN(3,2) + r_C(0,4)*r_DN(3,1);
const double crLHS214 = r_C(3,4)*r_DN(3,1);
const double crLHS215 = crLHS209 + crLHS214 + r_C(2,3)*r_DN(3,2);
const double crLHS216 = r_C(2,5)*r_DN(3,2);
const double crLHS217 = crLHS216 + r_C(4,5)*r_DN(3,1) + r_C(5,5)*r_DN(3,0);
const double crLHS218 = -crLHS123*crLHS200 + r_DN(3,2);
const double crLHS219 = crLHS126*r_DN(3,0) + crLHS127*r_DN(3,1) + crLHS128*r_DN(3,2);
const double crLHS220 = crLHS219 + crLHS76;
const double crLHS221 = crLHS110 + r_C(0,1)*r_DN(0,0) + r_C(1,5)*r_DN(0,2);
const double crLHS222 = crLHS113 + crLHS119 + r_C(0,4)*r_DN(0,0);
const double crLHS223 = crLHS100*r_DN(0,1);
const double crLHS224 = r_C(1,1)*r_DN(0,1) + r_C(1,3)*r_DN(0,0) + r_C(1,4)*r_DN(0,2);
const double crLHS225 = r_C(1,4)*r_DN(0,1);
const double crLHS226 = crLHS225 + r_C(3,4)*r_DN(0,0) + r_C(4,4)*r_DN(0,2);
const double crLHS227 = crLHS225 + r_C(1,2)*r_DN(0,2) + r_C(1,5)*r_DN(0,0);
const double crLHS228 = r_C(2,4)*r_DN(0,2);
const double crLHS229 = crLHS228 + r_C(4,4)*r_DN(0,1) + r_C(4,5)*r_DN(0,0);
const double crLHS230 = crLHS131*r_DN(0,1);
const double crLHS231 = r_DN(0,1)*r_N[1];
const double crLHS232 = crLHS148 + r_C(0,1)*r_DN(1,0) + r_C(1,5)*r_DN(1,2);
const double crLHS233 = crLHS151 + crLHS156 + r_C(0,4)*r_DN(1,0);
const double crLHS234 = r_C(1,1)*r_DN(1,1) + r_C(1,3)*r_DN(1,0) + r_C(1,4)*r_DN(1,2);
const double crLHS235 = r_C(1,4)*r_DN(1,1);
const double crLHS236 = crLHS235 + r_C(3,4)*r_DN(1,0) + r_C(4,4)*r_DN(1,2);
const double crLHS237 = crLHS235 + r_C(1,2)*r_DN(1,2) + r_C(1,5)*r_DN(1,0);
const double crLHS238 = r_C(2,4)*r_DN(1,2);
const double crLHS239 = crLHS238 + r_C(4,4)*r_DN(1,1) + r_C(4,5)*r_DN(1,0);
const double crLHS240 = r_DN(0,1)*r_N[2];
const double crLHS241 = crLHS178 + r_C(0,1)*r_DN(2,0) + r_C(1,5)*r_DN(2,2);
const double crLHS242 = crLHS181 + crLHS186 + r_C(0,4)*r_DN(2,0);
const double crLHS243 = r_C(1,1)*r_DN(2,1) + r_C(1,3)*r_DN(2,0) + r_C(1,4)*r_DN(2,2);
const double crLHS244 = r_C(1,4)*r_DN(2,1);
const double crLHS245 = crLHS244 + r_C(3,4)*r_DN(2,0) + r_C(4,4)*r_DN(2,2);
const double crLHS246 = crLHS244 + r_C(1,2)*r_DN(2,2) + r_C(1,5)*r_DN(2,0);
const double crLHS247 = r_C(2,4)*r_DN(2,2);
const double crLHS248 = crLHS247 + r_C(4,4)*r_DN(2,1) + r_C(4,5)*r_DN(2,0);
const double crLHS249 = r_DN(0,1)*r_N[3];
const double crLHS250 = crLHS207 + r_C(0,1)*r_DN(3,0) + r_C(1,5)*r_DN(3,2);
const double crLHS251 = crLHS210 + crLHS214 + r_C(0,4)*r_DN(3,0);
const double crLHS252 = r_C(1,1)*r_DN(3,1) + r_C(1,3)*r_DN(3,0) + r_C(1,4)*r_DN(3,2);
const double crLHS253 = r_C(1,4)*r_DN(3,1);
const double crLHS254 = crLHS253 + r_C(3,4)*r_DN(3,0) + r_C(4,4)*r_DN(3,2);
const double crLHS255 = crLHS253 + r_C(1,2)*r_DN(3,2) + r_C(1,5)*r_DN(3,0);
const double crLHS256 = r_C(2,4)*r_DN(3,2);
const double crLHS257 = crLHS256 + r_C(4,4)*r_DN(3,1) + r_C(4,5)*r_DN(3,0);
const double crLHS258 = crLHS121 + r_C(0,2)*r_DN(0,0) + r_C(2,3)*r_DN(0,1);
const double crLHS259 = crLHS100*r_DN(0,2);
const double crLHS260 = crLHS228 + r_C(1,2)*r_DN(0,1) + r_C(2,3)*r_DN(0,0);
const double crLHS261 = r_C(2,2)*r_DN(0,2) + r_C(2,4)*r_DN(0,1) + r_C(2,5)*r_DN(0,0);
const double crLHS262 = crLHS131*r_DN(0,2);
const double crLHS263 = r_DN(0,2)*r_N[1];
const double crLHS264 = crLHS158 + r_C(0,2)*r_DN(1,0) + r_C(2,3)*r_DN(1,1);
const double crLHS265 = crLHS238 + r_C(1,2)*r_DN(1,1) + r_C(2,3)*r_DN(1,0);
const double crLHS266 = r_C(2,2)*r_DN(1,2) + r_C(2,4)*r_DN(1,1) + r_C(2,5)*r_DN(1,0);
const double crLHS267 = r_DN(0,2)*r_N[2];
const double crLHS268 = crLHS188 + r_C(0,2)*r_DN(2,0) + r_C(2,3)*r_DN(2,1);
const double crLHS269 = crLHS247 + r_C(1,2)*r_DN(2,1) + r_C(2,3)*r_DN(2,0);
const double crLHS270 = r_C(2,2)*r_DN(2,2) + r_C(2,4)*r_DN(2,1) + r_C(2,5)*r_DN(2,0);
const double crLHS271 = r_DN(0,2)*r_N[3];
const double crLHS272 = crLHS216 + r_C(0,2)*r_DN(3,0) + r_C(2,3)*r_DN(3,1);
const double crLHS273 = crLHS256 + r_C(1,2)*r_DN(3,1) + r_C(2,3)*r_DN(3,0);
const double crLHS274 = r_C(2,2)*r_DN(3,2) + r_C(2,4)*r_DN(3,1) + r_C(2,5)*r_DN(3,0);
const double crLHS275 = crLHS14*crLHS46;
const double crLHS276 = dp_th_dt*r_N[0];
const double crLHS277 = -crLHS21 + crLHS276;
const double crLHS278 = crLHS26*tau_t;
const double crLHS279 = crLHS276*crLHS278;
const double crLHS280 = crLHS278*crLHS4;
const double crLHS281 = crLHS280*crLHS87;
const double crLHS282 = crLHS281*r_N[0];
const double crLHS283 = crLHS20*crLHS280;
const double crLHS284 = tau_t*1.0/(crLHS5*crLHS5*crLHS5);
const double crLHS285 = crLHS284*crLHS89;
const double crLHS286 = crLHS47*crLHS98;
const double crLHS287 = crLHS116*crLHS47;
const double crLHS288 = crLHS124*crLHS47;
const double crLHS289 = dp_th_dt*r_N[1];
const double crLHS290 = crLHS289 - crLHS40;
const double crLHS291 = -crLHS140*crLHS276 + crLHS144 + crLHS29*kappa + crLHS30*kappa + crLHS31*kappa;
const double crLHS292 = crLHS66*crLHS98;
const double crLHS293 = crLHS116*crLHS66;
const double crLHS294 = crLHS124*crLHS66;
const double crLHS295 = dp_th_dt*r_N[2];
const double crLHS296 = crLHS295 - crLHS60;
const double crLHS297 = -crLHS170*crLHS276 + crLHS174 + crLHS50*kappa + crLHS51*kappa + crLHS52*kappa;
const double crLHS298 = crLHS84*crLHS98;
const double crLHS299 = crLHS116*crLHS84;
const double crLHS300 = crLHS124*crLHS84;
const double crLHS301 = dp_th_dt*r_N[3];
const double crLHS302 = crLHS301 - crLHS78;
const double crLHS303 = -crLHS200*crLHS276 + crLHS203 + crLHS68*kappa + crLHS69*kappa + crLHS70*kappa;
const double crLHS304 = r_DN(1,0)*r_DN(1,0);
const double crLHS305 = r_DN(1,1)*r_DN(1,1);
const double crLHS306 = r_DN(1,2)*r_DN(1,2);
const double crLHS307 = r_N[1]*r_N[1];
const double crLHS308 = crLHS307*crLHS6;
const double crLHS309 = r_DN(1,0)*r_DN(2,0);
const double crLHS310 = r_DN(1,1)*r_DN(2,1);
const double crLHS311 = r_DN(1,2)*r_DN(2,2);
const double crLHS312 = crLHS11*(crLHS309 + crLHS310 + crLHS311);
const double crLHS313 = r_DN(2,0)*r_N[1];
const double crLHS314 = crLHS140*r_N[2];
const double crLHS315 = -crLHS12*crLHS314;
const double crLHS316 = r_DN(2,1)*r_N[1];
const double crLHS317 = -crLHS23*crLHS314;
const double crLHS318 = r_DN(2,2)*r_N[1];
const double crLHS319 = -crLHS24*crLHS314;
const double crLHS320 = crLHS27*crLHS38;
const double crLHS321 = -crLHS320*crLHS66;
const double crLHS322 = r_DN(1,0)*r_DN(3,0);
const double crLHS323 = r_DN(1,1)*r_DN(3,1);
const double crLHS324 = r_DN(1,2)*r_DN(3,2);
const double crLHS325 = crLHS11*(crLHS322 + crLHS323 + crLHS324);
const double crLHS326 = r_DN(3,0)*r_N[1];
const double crLHS327 = crLHS140*r_N[3];
const double crLHS328 = -crLHS12*crLHS327;
const double crLHS329 = r_DN(3,1)*r_N[1];
const double crLHS330 = -crLHS23*crLHS327;
const double crLHS331 = r_DN(3,2)*r_N[1];
const double crLHS332 = -crLHS24*crLHS327;
const double crLHS333 = -crLHS320*crLHS84;
const double crLHS334 = crLHS37*tau_u;
const double crLHS335 = crLHS100*r_DN(1,0);
const double crLHS336 = crLHS143*crLHS7;
const double crLHS337 = crLHS39*crLHS9;
const double crLHS338 = crLHS336*crLHS87;
const double crLHS339 = crLHS88*r_N[1];
const double crLHS340 = crLHS27*crLHS339;
const double crLHS341 = crLHS145 + crLHS20*crLHS336 + crLHS22*crLHS337 + crLHS22*crLHS338 - crLHS22*crLHS340 - crLHS22*crLHS37;
const double crLHS342 = crLHS131*r_DN(1,0);
const double crLHS343 = gauss_weight*(crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_N[1]*tau_u - crLHS334 - crLHS339*crLHS90 - r_N[1]);
const double crLHS344 = crLHS25*crLHS308;
const double crLHS345 = crLHS307*sigma + crLHS336*crLHS39 + crLHS337*crLHS41 + crLHS338*crLHS41 - crLHS340*crLHS41 + crLHS344*crLHS7 - crLHS37*crLHS41;
const double crLHS346 = r_DN(1,0)*r_N[2];
const double crLHS347 = crLHS173*crLHS38;
const double crLHS348 = crLHS347*crLHS7 + crLHS37*r_N[2];
const double crLHS349 = crLHS336*crLHS59 + crLHS337*crLHS61 + crLHS338*crLHS61 - crLHS340*crLHS61 + crLHS348 - crLHS37*crLHS61;
const double crLHS350 = r_DN(1,0)*r_N[3];
const double crLHS351 = crLHS202*crLHS38;
const double crLHS352 = crLHS351*crLHS7 + crLHS37*r_N[3];
const double crLHS353 = crLHS336*crLHS77 + crLHS337*crLHS79 + crLHS338*crLHS79 - crLHS340*crLHS79 + crLHS352 - crLHS37*crLHS79;
const double crLHS354 = crLHS100*r_DN(1,1);
const double crLHS355 = crLHS131*r_DN(1,1);
const double crLHS356 = r_DN(1,1)*r_N[2];
const double crLHS357 = r_DN(1,1)*r_N[3];
const double crLHS358 = crLHS100*r_DN(1,2);
const double crLHS359 = crLHS131*r_DN(1,2);
const double crLHS360 = r_DN(1,2)*r_N[2];
const double crLHS361 = r_DN(1,2)*r_N[3];
const double crLHS362 = crLHS278*crLHS289;
const double crLHS363 = crLHS280*crLHS39;
const double crLHS364 = crLHS284*crLHS339;
const double crLHS365 = crLHS281*r_N[1];
const double crLHS366 = crLHS308*crLHS46;
const double crLHS367 = crLHS141*crLHS66;
const double crLHS368 = crLHS153*crLHS66;
const double crLHS369 = crLHS160*crLHS66;
const double crLHS370 = -crLHS170*crLHS289 + crLHS309*kappa + crLHS310*kappa + crLHS311*kappa + crLHS347;
const double crLHS371 = crLHS141*crLHS84;
const double crLHS372 = crLHS153*crLHS84;
const double crLHS373 = crLHS160*crLHS84;
const double crLHS374 = -crLHS200*crLHS289 + crLHS322*kappa + crLHS323*kappa + crLHS324*kappa + crLHS351;
const double crLHS375 = r_DN(2,0)*r_DN(2,0);
const double crLHS376 = r_DN(2,1)*r_DN(2,1);
const double crLHS377 = r_DN(2,2)*r_DN(2,2);
const double crLHS378 = r_N[2]*r_N[2];
const double crLHS379 = crLHS378*crLHS6;
const double crLHS380 = r_DN(2,0)*r_DN(3,0);
const double crLHS381 = r_DN(2,1)*r_DN(3,1);
const double crLHS382 = r_DN(2,2)*r_DN(3,2);
const double crLHS383 = crLHS11*(crLHS380 + crLHS381 + crLHS382);
const double crLHS384 = r_DN(3,0)*r_N[2];
const double crLHS385 = crLHS170*r_N[3];
const double crLHS386 = -crLHS12*crLHS385;
const double crLHS387 = r_DN(3,1)*r_N[2];
const double crLHS388 = -crLHS23*crLHS385;
const double crLHS389 = r_DN(3,2)*r_N[2];
const double crLHS390 = -crLHS24*crLHS385;
const double crLHS391 = -crLHS27*crLHS58*crLHS84;
const double crLHS392 = crLHS57*tau_u;
const double crLHS393 = crLHS100*r_DN(2,0);
const double crLHS394 = crLHS173*crLHS7;
const double crLHS395 = crLHS59*crLHS9;
const double crLHS396 = crLHS394*crLHS87;
const double crLHS397 = crLHS88*r_N[2];
const double crLHS398 = crLHS27*crLHS397;
const double crLHS399 = crLHS175 + crLHS20*crLHS394 + crLHS22*crLHS395 + crLHS22*crLHS396 - crLHS22*crLHS398 - crLHS22*crLHS57;
const double crLHS400 = crLHS131*r_DN(2,0);
const double crLHS401 = crLHS348 + crLHS39*crLHS394 + crLHS395*crLHS41 + crLHS396*crLHS41 - crLHS398*crLHS41 - crLHS41*crLHS57;
const double crLHS402 = gauss_weight*(crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_N[2]*tau_u - crLHS392 - crLHS397*crLHS90 - r_N[2]);
const double crLHS403 = crLHS25*crLHS379;
const double crLHS404 = crLHS378*sigma + crLHS394*crLHS59 + crLHS395*crLHS61 + crLHS396*crLHS61 - crLHS398*crLHS61 + crLHS403*crLHS7 - crLHS57*crLHS61;
const double crLHS405 = r_DN(2,0)*r_N[3];
const double crLHS406 = crLHS202*crLHS58;
const double crLHS407 = crLHS406*crLHS7 + crLHS57*r_N[3];
const double crLHS408 = crLHS394*crLHS77 + crLHS395*crLHS79 + crLHS396*crLHS79 - crLHS398*crLHS79 + crLHS407 - crLHS57*crLHS79;
const double crLHS409 = crLHS100*r_DN(2,1);
const double crLHS410 = crLHS131*r_DN(2,1);
const double crLHS411 = r_DN(2,1)*r_N[3];
const double crLHS412 = crLHS100*r_DN(2,2);
const double crLHS413 = crLHS131*r_DN(2,2);
const double crLHS414 = r_DN(2,2)*r_N[3];
const double crLHS415 = crLHS278*crLHS295;
const double crLHS416 = crLHS280*crLHS59;
const double crLHS417 = crLHS284*crLHS397;
const double crLHS418 = crLHS281*r_N[2];
const double crLHS419 = crLHS379*crLHS46;
const double crLHS420 = crLHS171*crLHS84;
const double crLHS421 = crLHS183*crLHS84;
const double crLHS422 = crLHS190*crLHS84;
const double crLHS423 = -crLHS200*crLHS295 + crLHS380*kappa + crLHS381*kappa + crLHS382*kappa + crLHS406;
const double crLHS424 = r_DN(3,0)*r_DN(3,0);
const double crLHS425 = r_DN(3,1)*r_DN(3,1);
const double crLHS426 = r_DN(3,2)*r_DN(3,2);
const double crLHS427 = r_N[3]*r_N[3];
const double crLHS428 = crLHS427*crLHS6;
const double crLHS429 = crLHS75*tau_u;
const double crLHS430 = crLHS100*r_DN(3,0);
const double crLHS431 = crLHS202*crLHS7;
const double crLHS432 = crLHS77*crLHS9;
const double crLHS433 = crLHS431*crLHS87;
const double crLHS434 = crLHS88*r_N[3];
const double crLHS435 = crLHS27*crLHS434;
const double crLHS436 = crLHS20*crLHS431 + crLHS204 + crLHS22*crLHS432 + crLHS22*crLHS433 - crLHS22*crLHS435 - crLHS22*crLHS75;
const double crLHS437 = crLHS131*r_DN(3,0);
const double crLHS438 = crLHS352 + crLHS39*crLHS431 + crLHS41*crLHS432 + crLHS41*crLHS433 - crLHS41*crLHS435 - crLHS41*crLHS75;
const double crLHS439 = crLHS407 + crLHS431*crLHS59 + crLHS432*crLHS61 + crLHS433*crLHS61 - crLHS435*crLHS61 - crLHS61*crLHS75;
const double crLHS440 = gauss_weight*(crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_N[3]*tau_u - crLHS429 - crLHS434*crLHS90 - r_N[3]);
const double crLHS441 = crLHS25*crLHS428;
const double crLHS442 = crLHS427*sigma + crLHS431*crLHS77 + crLHS432*crLHS79 + crLHS433*crLHS79 - crLHS435*crLHS79 + crLHS441*crLHS7 - crLHS75*crLHS79;
const double crLHS443 = crLHS100*r_DN(3,1);
const double crLHS444 = crLHS131*r_DN(3,1);
const double crLHS445 = crLHS100*r_DN(3,2);
const double crLHS446 = crLHS131*r_DN(3,2);
const double crLHS447 = crLHS278*crLHS301;
const double crLHS448 = crLHS280*crLHS77;
const double crLHS449 = crLHS284*crLHS434;
const double crLHS450 = crLHS281*r_N[3];
const double crLHS451 = crLHS428*crLHS46;
rLHS(0,0)+=crLHS11*(crLHS0 + crLHS1 + crLHS2);
rLHS(0,1)+=crLHS10*(-crLHS12*crLHS14 + crLHS22*r_DN(0,0) + r_DN(0,0)*r_N[0]);
rLHS(0,2)+=crLHS10*(-crLHS14*crLHS23 + crLHS22*r_DN(0,1) + r_DN(0,1)*r_N[0]);
rLHS(0,3)+=crLHS10*(-crLHS14*crLHS24 + crLHS22*r_DN(0,2) + r_DN(0,2)*r_N[0]);
rLHS(0,4)+=-crLHS13*crLHS28;
rLHS(0,5)+=crLHS32;
rLHS(0,6)+=crLHS10*(crLHS33 + crLHS36 + crLHS41*r_DN(0,0));
rLHS(0,7)+=crLHS10*(crLHS41*r_DN(0,1) + crLHS42 + crLHS43);
rLHS(0,8)+=crLHS10*(crLHS41*r_DN(0,2) + crLHS44 + crLHS45);
rLHS(0,9)+=crLHS49;
rLHS(0,10)+=crLHS53;
rLHS(0,11)+=crLHS10*(crLHS54 + crLHS56 + crLHS61*r_DN(0,0));
rLHS(0,12)+=crLHS10*(crLHS61*r_DN(0,1) + crLHS62 + crLHS63);
rLHS(0,13)+=crLHS10*(crLHS61*r_DN(0,2) + crLHS64 + crLHS65);
rLHS(0,14)+=crLHS67;
rLHS(0,15)+=crLHS71;
rLHS(0,16)+=crLHS10*(crLHS72 + crLHS74 + crLHS79*r_DN(0,0));
rLHS(0,17)+=crLHS10*(crLHS79*r_DN(0,1) + crLHS80 + crLHS81);
rLHS(0,18)+=crLHS10*(crLHS79*r_DN(0,2) + crLHS82 + crLHS83);
rLHS(0,19)+=crLHS85;
rLHS(1,0)+=crLHS91*r_DN(0,0);
rLHS(1,1)+=gauss_weight*(crLHS101*crLHS99 + crLHS108 + crLHS92*r_DN(0,0) + crLHS94*r_DN(0,1) + crLHS96*r_DN(0,2));
rLHS(1,2)+=gauss_weight*(crLHS101*crLHS117 + crLHS109*r_DN(0,0) + crLHS111*r_DN(0,1) + crLHS114*r_DN(0,2));
rLHS(1,3)+=gauss_weight*(crLHS101*crLHS125 + crLHS118*r_DN(0,0) + crLHS120*r_DN(0,1) + crLHS122*r_DN(0,2));
rLHS(1,4)+=-crLHS130*crLHS132;
rLHS(1,5)+=gauss_weight*(-crLHS133 - crLHS134*crLHS33 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,0)*r_N[0]*tau_u - crLHS86*r_DN(1,0));
rLHS(1,6)+=gauss_weight*(crLHS101*crLHS142 + crLHS135*r_DN(0,0) + crLHS137*r_DN(0,1) + crLHS139*r_DN(0,2) + crLHS146);
rLHS(1,7)+=gauss_weight*(crLHS101*crLHS154 + crLHS147*r_DN(0,0) + crLHS149*r_DN(0,1) + crLHS152*r_DN(0,2));
rLHS(1,8)+=gauss_weight*(crLHS101*crLHS161 + crLHS155*r_DN(0,0) + crLHS157*r_DN(0,1) + crLHS159*r_DN(0,2));
rLHS(1,9)+=-crLHS132*crLHS163;
rLHS(1,10)+=gauss_weight*(-crLHS134*crLHS54 - crLHS164 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,0)*r_N[0]*tau_u - crLHS86*r_DN(2,0));
rLHS(1,11)+=gauss_weight*(crLHS101*crLHS172 + crLHS165*r_DN(0,0) + crLHS167*r_DN(0,1) + crLHS169*r_DN(0,2) + crLHS176);
rLHS(1,12)+=gauss_weight*(crLHS101*crLHS184 + crLHS177*r_DN(0,0) + crLHS179*r_DN(0,1) + crLHS182*r_DN(0,2));
rLHS(1,13)+=gauss_weight*(crLHS101*crLHS191 + crLHS185*r_DN(0,0) + crLHS187*r_DN(0,1) + crLHS189*r_DN(0,2));
rLHS(1,14)+=-crLHS132*crLHS193;
rLHS(1,15)+=gauss_weight*(-crLHS134*crLHS72 - crLHS194 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,0)*r_N[0]*tau_u - crLHS86*r_DN(3,0));
rLHS(1,16)+=gauss_weight*(crLHS101*crLHS201 + crLHS195*r_DN(0,0) + crLHS197*r_DN(0,1) + crLHS199*r_DN(0,2) + crLHS205);
rLHS(1,17)+=gauss_weight*(crLHS101*crLHS212 + crLHS206*r_DN(0,0) + crLHS208*r_DN(0,1) + crLHS211*r_DN(0,2));
rLHS(1,18)+=gauss_weight*(crLHS101*crLHS218 + crLHS213*r_DN(0,0) + crLHS215*r_DN(0,1) + crLHS217*r_DN(0,2));
rLHS(1,19)+=-crLHS132*crLHS220;
rLHS(2,0)+=crLHS91*r_DN(0,1);
rLHS(2,1)+=gauss_weight*(crLHS221*r_DN(0,1) + crLHS222*r_DN(0,2) + crLHS223*crLHS99 + crLHS94*r_DN(0,0));
rLHS(2,2)+=gauss_weight*(crLHS108 + crLHS111*r_DN(0,0) + crLHS117*crLHS223 + crLHS224*r_DN(0,1) + crLHS226*r_DN(0,2));
rLHS(2,3)+=gauss_weight*(crLHS120*r_DN(0,0) + crLHS125*crLHS223 + crLHS227*r_DN(0,1) + crLHS229*r_DN(0,2));
rLHS(2,4)+=-crLHS130*crLHS230;
rLHS(2,5)+=gauss_weight*(-crLHS134*crLHS42 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u - crLHS231 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,1)*r_N[0]*tau_u - crLHS86*r_DN(1,1));
rLHS(2,6)+=gauss_weight*(crLHS137*r_DN(0,0) + crLHS142*crLHS223 + crLHS232*r_DN(0,1) + crLHS233*r_DN(0,2));
rLHS(2,7)+=gauss_weight*(crLHS146 + crLHS149*r_DN(0,0) + crLHS154*crLHS223 + crLHS234*r_DN(0,1) + crLHS236*r_DN(0,2));
rLHS(2,8)+=gauss_weight*(crLHS157*r_DN(0,0) + crLHS161*crLHS223 + crLHS237*r_DN(0,1) + crLHS239*r_DN(0,2));
rLHS(2,9)+=-crLHS163*crLHS230;
rLHS(2,10)+=gauss_weight*(-crLHS134*crLHS62 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u - crLHS240 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,1)*r_N[0]*tau_u - crLHS86*r_DN(2,1));
rLHS(2,11)+=gauss_weight*(crLHS167*r_DN(0,0) + crLHS172*crLHS223 + crLHS241*r_DN(0,1) + crLHS242*r_DN(0,2));
rLHS(2,12)+=gauss_weight*(crLHS176 + crLHS179*r_DN(0,0) + crLHS184*crLHS223 + crLHS243*r_DN(0,1) + crLHS245*r_DN(0,2));
rLHS(2,13)+=gauss_weight*(crLHS187*r_DN(0,0) + crLHS191*crLHS223 + crLHS246*r_DN(0,1) + crLHS248*r_DN(0,2));
rLHS(2,14)+=-crLHS193*crLHS230;
rLHS(2,15)+=gauss_weight*(-crLHS134*crLHS80 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u - crLHS249 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,1)*r_N[0]*tau_u - crLHS86*r_DN(3,1));
rLHS(2,16)+=gauss_weight*(crLHS197*r_DN(0,0) + crLHS201*crLHS223 + crLHS250*r_DN(0,1) + crLHS251*r_DN(0,2));
rLHS(2,17)+=gauss_weight*(crLHS205 + crLHS208*r_DN(0,0) + crLHS212*crLHS223 + crLHS252*r_DN(0,1) + crLHS254*r_DN(0,2));
rLHS(2,18)+=gauss_weight*(crLHS215*r_DN(0,0) + crLHS218*crLHS223 + crLHS255*r_DN(0,1) + crLHS257*r_DN(0,2));
rLHS(2,19)+=-crLHS220*crLHS230;
rLHS(3,0)+=crLHS91*r_DN(0,2);
rLHS(3,1)+=gauss_weight*(crLHS222*r_DN(0,1) + crLHS258*r_DN(0,2) + crLHS259*crLHS99 + crLHS96*r_DN(0,0));
rLHS(3,2)+=gauss_weight*(crLHS114*r_DN(0,0) + crLHS117*crLHS259 + crLHS226*r_DN(0,1) + crLHS260*r_DN(0,2));
rLHS(3,3)+=gauss_weight*(crLHS108 + crLHS122*r_DN(0,0) + crLHS125*crLHS259 + crLHS229*r_DN(0,1) + crLHS261*r_DN(0,2));
rLHS(3,4)+=-crLHS130*crLHS262;
rLHS(3,5)+=gauss_weight*(-crLHS134*crLHS44 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u - crLHS263 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,2)*r_N[0]*tau_u - crLHS86*r_DN(1,2));
rLHS(3,6)+=gauss_weight*(crLHS139*r_DN(0,0) + crLHS142*crLHS259 + crLHS233*r_DN(0,1) + crLHS264*r_DN(0,2));
rLHS(3,7)+=gauss_weight*(crLHS152*r_DN(0,0) + crLHS154*crLHS259 + crLHS236*r_DN(0,1) + crLHS265*r_DN(0,2));
rLHS(3,8)+=gauss_weight*(crLHS146 + crLHS159*r_DN(0,0) + crLHS161*crLHS259 + crLHS239*r_DN(0,1) + crLHS266*r_DN(0,2));
rLHS(3,9)+=-crLHS163*crLHS262;
rLHS(3,10)+=gauss_weight*(-crLHS134*crLHS64 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u - crLHS267 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,2)*r_N[0]*tau_u - crLHS86*r_DN(2,2));
rLHS(3,11)+=gauss_weight*(crLHS169*r_DN(0,0) + crLHS172*crLHS259 + crLHS242*r_DN(0,1) + crLHS268*r_DN(0,2));
rLHS(3,12)+=gauss_weight*(crLHS182*r_DN(0,0) + crLHS184*crLHS259 + crLHS245*r_DN(0,1) + crLHS269*r_DN(0,2));
rLHS(3,13)+=gauss_weight*(crLHS176 + crLHS189*r_DN(0,0) + crLHS191*crLHS259 + crLHS248*r_DN(0,1) + crLHS270*r_DN(0,2));
rLHS(3,14)+=-crLHS193*crLHS262;
rLHS(3,15)+=gauss_weight*(-crLHS134*crLHS82 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u - crLHS271 + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,2)*r_N[0]*tau_u - crLHS86*r_DN(3,2));
rLHS(3,16)+=gauss_weight*(crLHS199*r_DN(0,0) + crLHS201*crLHS259 + crLHS251*r_DN(0,1) + crLHS272*r_DN(0,2));
rLHS(3,17)+=gauss_weight*(crLHS211*r_DN(0,0) + crLHS212*crLHS259 + crLHS254*r_DN(0,1) + crLHS273*r_DN(0,2));
rLHS(3,18)+=gauss_weight*(crLHS205 + crLHS217*r_DN(0,0) + crLHS218*crLHS259 + crLHS257*r_DN(0,1) + crLHS274*r_DN(0,2));
rLHS(3,19)+=-crLHS220*crLHS262;
rLHS(4,0)+=0;
rLHS(4,1)+=crLHS275*crLHS97;
rLHS(4,2)+=crLHS115*crLHS275;
rLHS(4,3)+=crLHS123*crLHS275;
rLHS(4,4)+=gauss_weight*(crLHS0*kappa + crLHS1*kappa + crLHS102 + crLHS103*crLHS129 - crLHS14*dp_th_dt + crLHS2*kappa - crLHS277*crLHS279 - crLHS277*crLHS282 - crLHS277*crLHS283 + crLHS277*crLHS285);
rLHS(4,5)+=0;
rLHS(4,6)+=crLHS286;
rLHS(4,7)+=crLHS287;
rLHS(4,8)+=crLHS288;
rLHS(4,9)+=gauss_weight*(crLHS103*crLHS162 - crLHS279*crLHS290 - crLHS282*crLHS290 - crLHS283*crLHS290 + crLHS285*crLHS290 + crLHS291);
rLHS(4,10)+=0;
rLHS(4,11)+=crLHS292;
rLHS(4,12)+=crLHS293;
rLHS(4,13)+=crLHS294;
rLHS(4,14)+=gauss_weight*(crLHS103*crLHS192 - crLHS279*crLHS296 - crLHS282*crLHS296 - crLHS283*crLHS296 + crLHS285*crLHS296 + crLHS297);
rLHS(4,15)+=0;
rLHS(4,16)+=crLHS298;
rLHS(4,17)+=crLHS299;
rLHS(4,18)+=crLHS300;
rLHS(4,19)+=gauss_weight*(crLHS103*crLHS219 - crLHS279*crLHS302 - crLHS282*crLHS302 - crLHS283*crLHS302 + crLHS285*crLHS302 + crLHS303);
rLHS(5,0)+=crLHS32;
rLHS(5,1)+=crLHS10*(crLHS133 + crLHS22*r_DN(1,0) + crLHS36);
rLHS(5,2)+=crLHS10*(crLHS22*r_DN(1,1) + crLHS231 + crLHS43);
rLHS(5,3)+=crLHS10*(crLHS22*r_DN(1,2) + crLHS263 + crLHS45);
rLHS(5,4)+=crLHS49;
rLHS(5,5)+=crLHS11*(crLHS304 + crLHS305 + crLHS306);
rLHS(5,6)+=crLHS10*(-crLHS12*crLHS308 + crLHS41*r_DN(1,0) + r_DN(1,0)*r_N[1]);
rLHS(5,7)+=crLHS10*(-crLHS23*crLHS308 + crLHS41*r_DN(1,1) + r_DN(1,1)*r_N[1]);
rLHS(5,8)+=crLHS10*(-crLHS24*crLHS308 + crLHS41*r_DN(1,2) + r_DN(1,2)*r_N[1]);
rLHS(5,9)+=-crLHS28*crLHS307;
rLHS(5,10)+=crLHS312;
rLHS(5,11)+=crLHS10*(crLHS313 + crLHS315 + crLHS61*r_DN(1,0));
rLHS(5,12)+=crLHS10*(crLHS316 + crLHS317 + crLHS61*r_DN(1,1));
rLHS(5,13)+=crLHS10*(crLHS318 + crLHS319 + crLHS61*r_DN(1,2));
rLHS(5,14)+=crLHS321;
rLHS(5,15)+=crLHS325;
rLHS(5,16)+=crLHS10*(crLHS326 + crLHS328 + crLHS79*r_DN(1,0));
rLHS(5,17)+=crLHS10*(crLHS329 + crLHS330 + crLHS79*r_DN(1,1));
rLHS(5,18)+=crLHS10*(crLHS331 + crLHS332 + crLHS79*r_DN(1,2));
rLHS(5,19)+=crLHS333;
rLHS(6,0)+=gauss_weight*(-crLHS133*crLHS134 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,0)*r_N[1]*tau_u - crLHS33 - crLHS334*r_DN(0,0));
rLHS(6,1)+=gauss_weight*(crLHS335*crLHS99 + crLHS341 + crLHS92*r_DN(1,0) + crLHS94*r_DN(1,1) + crLHS96*r_DN(1,2));
rLHS(6,2)+=gauss_weight*(crLHS109*r_DN(1,0) + crLHS111*r_DN(1,1) + crLHS114*r_DN(1,2) + crLHS117*crLHS335);
rLHS(6,3)+=gauss_weight*(crLHS118*r_DN(1,0) + crLHS120*r_DN(1,1) + crLHS122*r_DN(1,2) + crLHS125*crLHS335);
rLHS(6,4)+=-crLHS130*crLHS342;
rLHS(6,5)+=crLHS343*r_DN(1,0);
rLHS(6,6)+=gauss_weight*(crLHS135*r_DN(1,0) + crLHS137*r_DN(1,1) + crLHS139*r_DN(1,2) + crLHS142*crLHS335 + crLHS345);
rLHS(6,7)+=gauss_weight*(crLHS147*r_DN(1,0) + crLHS149*r_DN(1,1) + crLHS152*r_DN(1,2) + crLHS154*crLHS335);
rLHS(6,8)+=gauss_weight*(crLHS155*r_DN(1,0) + crLHS157*r_DN(1,1) + crLHS159*r_DN(1,2) + crLHS161*crLHS335);
rLHS(6,9)+=-crLHS163*crLHS342;
rLHS(6,10)+=gauss_weight*(-crLHS134*crLHS313 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,0)*r_N[1]*tau_u - crLHS334*r_DN(2,0) - crLHS346);
rLHS(6,11)+=gauss_weight*(crLHS165*r_DN(1,0) + crLHS167*r_DN(1,1) + crLHS169*r_DN(1,2) + crLHS172*crLHS335 + crLHS349);
rLHS(6,12)+=gauss_weight*(crLHS177*r_DN(1,0) + crLHS179*r_DN(1,1) + crLHS182*r_DN(1,2) + crLHS184*crLHS335);
rLHS(6,13)+=gauss_weight*(crLHS185*r_DN(1,0) + crLHS187*r_DN(1,1) + crLHS189*r_DN(1,2) + crLHS191*crLHS335);
rLHS(6,14)+=-crLHS193*crLHS342;
rLHS(6,15)+=gauss_weight*(-crLHS134*crLHS326 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,0)*r_N[1]*tau_u - crLHS334*r_DN(3,0) - crLHS350);
rLHS(6,16)+=gauss_weight*(crLHS195*r_DN(1,0) + crLHS197*r_DN(1,1) + crLHS199*r_DN(1,2) + crLHS201*crLHS335 + crLHS353);
rLHS(6,17)+=gauss_weight*(crLHS206*r_DN(1,0) + crLHS208*r_DN(1,1) + crLHS211*r_DN(1,2) + crLHS212*crLHS335);
rLHS(6,18)+=gauss_weight*(crLHS213*r_DN(1,0) + crLHS215*r_DN(1,1) + crLHS217*r_DN(1,2) + crLHS218*crLHS335);
rLHS(6,19)+=-crLHS220*crLHS342;
rLHS(7,0)+=gauss_weight*(-crLHS134*crLHS231 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,1)*r_N[1]*tau_u - crLHS334*r_DN(0,1) - crLHS42);
rLHS(7,1)+=gauss_weight*(crLHS221*r_DN(1,1) + crLHS222*r_DN(1,2) + crLHS354*crLHS99 + crLHS94*r_DN(1,0));
rLHS(7,2)+=gauss_weight*(crLHS111*r_DN(1,0) + crLHS117*crLHS354 + crLHS224*r_DN(1,1) + crLHS226*r_DN(1,2) + crLHS341);
rLHS(7,3)+=gauss_weight*(crLHS120*r_DN(1,0) + crLHS125*crLHS354 + crLHS227*r_DN(1,1) + crLHS229*r_DN(1,2));
rLHS(7,4)+=-crLHS130*crLHS355;
rLHS(7,5)+=crLHS343*r_DN(1,1);
rLHS(7,6)+=gauss_weight*(crLHS137*r_DN(1,0) + crLHS142*crLHS354 + crLHS232*r_DN(1,1) + crLHS233*r_DN(1,2));
rLHS(7,7)+=gauss_weight*(crLHS149*r_DN(1,0) + crLHS154*crLHS354 + crLHS234*r_DN(1,1) + crLHS236*r_DN(1,2) + crLHS345);
rLHS(7,8)+=gauss_weight*(crLHS157*r_DN(1,0) + crLHS161*crLHS354 + crLHS237*r_DN(1,1) + crLHS239*r_DN(1,2));
rLHS(7,9)+=-crLHS163*crLHS355;
rLHS(7,10)+=gauss_weight*(-crLHS134*crLHS316 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,1)*r_N[1]*tau_u - crLHS334*r_DN(2,1) - crLHS356);
rLHS(7,11)+=gauss_weight*(crLHS167*r_DN(1,0) + crLHS172*crLHS354 + crLHS241*r_DN(1,1) + crLHS242*r_DN(1,2));
rLHS(7,12)+=gauss_weight*(crLHS179*r_DN(1,0) + crLHS184*crLHS354 + crLHS243*r_DN(1,1) + crLHS245*r_DN(1,2) + crLHS349);
rLHS(7,13)+=gauss_weight*(crLHS187*r_DN(1,0) + crLHS191*crLHS354 + crLHS246*r_DN(1,1) + crLHS248*r_DN(1,2));
rLHS(7,14)+=-crLHS193*crLHS355;
rLHS(7,15)+=gauss_weight*(-crLHS134*crLHS329 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,1)*r_N[1]*tau_u - crLHS334*r_DN(3,1) - crLHS357);
rLHS(7,16)+=gauss_weight*(crLHS197*r_DN(1,0) + crLHS201*crLHS354 + crLHS250*r_DN(1,1) + crLHS251*r_DN(1,2));
rLHS(7,17)+=gauss_weight*(crLHS208*r_DN(1,0) + crLHS212*crLHS354 + crLHS252*r_DN(1,1) + crLHS254*r_DN(1,2) + crLHS353);
rLHS(7,18)+=gauss_weight*(crLHS215*r_DN(1,0) + crLHS218*crLHS354 + crLHS255*r_DN(1,1) + crLHS257*r_DN(1,2));
rLHS(7,19)+=-crLHS220*crLHS355;
rLHS(8,0)+=gauss_weight*(-crLHS134*crLHS263 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,2)*r_N[1]*tau_u - crLHS334*r_DN(0,2) - crLHS44);
rLHS(8,1)+=gauss_weight*(crLHS222*r_DN(1,1) + crLHS258*r_DN(1,2) + crLHS358*crLHS99 + crLHS96*r_DN(1,0));
rLHS(8,2)+=gauss_weight*(crLHS114*r_DN(1,0) + crLHS117*crLHS358 + crLHS226*r_DN(1,1) + crLHS260*r_DN(1,2));
rLHS(8,3)+=gauss_weight*(crLHS122*r_DN(1,0) + crLHS125*crLHS358 + crLHS229*r_DN(1,1) + crLHS261*r_DN(1,2) + crLHS341);
rLHS(8,4)+=-crLHS130*crLHS359;
rLHS(8,5)+=crLHS343*r_DN(1,2);
rLHS(8,6)+=gauss_weight*(crLHS139*r_DN(1,0) + crLHS142*crLHS358 + crLHS233*r_DN(1,1) + crLHS264*r_DN(1,2));
rLHS(8,7)+=gauss_weight*(crLHS152*r_DN(1,0) + crLHS154*crLHS358 + crLHS236*r_DN(1,1) + crLHS265*r_DN(1,2));
rLHS(8,8)+=gauss_weight*(crLHS159*r_DN(1,0) + crLHS161*crLHS358 + crLHS239*r_DN(1,1) + crLHS266*r_DN(1,2) + crLHS345);
rLHS(8,9)+=-crLHS163*crLHS359;
rLHS(8,10)+=gauss_weight*(-crLHS134*crLHS318 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,2)*r_N[1]*tau_u - crLHS334*r_DN(2,2) - crLHS360);
rLHS(8,11)+=gauss_weight*(crLHS169*r_DN(1,0) + crLHS172*crLHS358 + crLHS242*r_DN(1,1) + crLHS268*r_DN(1,2));
rLHS(8,12)+=gauss_weight*(crLHS182*r_DN(1,0) + crLHS184*crLHS358 + crLHS245*r_DN(1,1) + crLHS269*r_DN(1,2));
rLHS(8,13)+=gauss_weight*(crLHS189*r_DN(1,0) + crLHS191*crLHS358 + crLHS248*r_DN(1,1) + crLHS270*r_DN(1,2) + crLHS349);
rLHS(8,14)+=-crLHS193*crLHS359;
rLHS(8,15)+=gauss_weight*(-crLHS134*crLHS331 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,2)*r_N[1]*tau_u - crLHS334*r_DN(3,2) - crLHS361);
rLHS(8,16)+=gauss_weight*(crLHS199*r_DN(1,0) + crLHS201*crLHS358 + crLHS251*r_DN(1,1) + crLHS272*r_DN(1,2));
rLHS(8,17)+=gauss_weight*(crLHS211*r_DN(1,0) + crLHS212*crLHS358 + crLHS254*r_DN(1,1) + crLHS273*r_DN(1,2));
rLHS(8,18)+=gauss_weight*(crLHS217*r_DN(1,0) + crLHS218*crLHS358 + crLHS257*r_DN(1,1) + crLHS274*r_DN(1,2) + crLHS353);
rLHS(8,19)+=-crLHS220*crLHS359;
rLHS(9,0)+=0;
rLHS(9,1)+=crLHS286;
rLHS(9,2)+=crLHS287;
rLHS(9,3)+=crLHS288;
rLHS(9,4)+=gauss_weight*(crLHS129*crLHS143 - crLHS277*crLHS362 - crLHS277*crLHS363 + crLHS277*crLHS364 - crLHS277*crLHS365 + crLHS291);
rLHS(9,5)+=0;
rLHS(9,6)+=crLHS366*crLHS97;
rLHS(9,7)+=crLHS115*crLHS366;
rLHS(9,8)+=crLHS123*crLHS366;
rLHS(9,9)+=gauss_weight*(crLHS143*crLHS162 - crLHS290*crLHS362 - crLHS290*crLHS363 + crLHS290*crLHS364 - crLHS290*crLHS365 + crLHS304*kappa + crLHS305*kappa + crLHS306*kappa - crLHS308*dp_th_dt + crLHS344);
rLHS(9,10)+=0;
rLHS(9,11)+=crLHS367;
rLHS(9,12)+=crLHS368;
rLHS(9,13)+=crLHS369;
rLHS(9,14)+=gauss_weight*(crLHS143*crLHS192 - crLHS296*crLHS362 - crLHS296*crLHS363 + crLHS296*crLHS364 - crLHS296*crLHS365 + crLHS370);
rLHS(9,15)+=0;
rLHS(9,16)+=crLHS371;
rLHS(9,17)+=crLHS372;
rLHS(9,18)+=crLHS373;
rLHS(9,19)+=gauss_weight*(crLHS143*crLHS219 - crLHS302*crLHS362 - crLHS302*crLHS363 + crLHS302*crLHS364 - crLHS302*crLHS365 + crLHS374);
rLHS(10,0)+=crLHS53;
rLHS(10,1)+=crLHS10*(crLHS164 + crLHS22*r_DN(2,0) + crLHS56);
rLHS(10,2)+=crLHS10*(crLHS22*r_DN(2,1) + crLHS240 + crLHS63);
rLHS(10,3)+=crLHS10*(crLHS22*r_DN(2,2) + crLHS267 + crLHS65);
rLHS(10,4)+=crLHS67;
rLHS(10,5)+=crLHS312;
rLHS(10,6)+=crLHS10*(crLHS315 + crLHS346 + crLHS41*r_DN(2,0));
rLHS(10,7)+=crLHS10*(crLHS317 + crLHS356 + crLHS41*r_DN(2,1));
rLHS(10,8)+=crLHS10*(crLHS319 + crLHS360 + crLHS41*r_DN(2,2));
rLHS(10,9)+=crLHS321;
rLHS(10,10)+=crLHS11*(crLHS375 + crLHS376 + crLHS377);
rLHS(10,11)+=crLHS10*(-crLHS12*crLHS379 + crLHS61*r_DN(2,0) + r_DN(2,0)*r_N[2]);
rLHS(10,12)+=crLHS10*(-crLHS23*crLHS379 + crLHS61*r_DN(2,1) + r_DN(2,1)*r_N[2]);
rLHS(10,13)+=crLHS10*(-crLHS24*crLHS379 + crLHS61*r_DN(2,2) + r_DN(2,2)*r_N[2]);
rLHS(10,14)+=-crLHS28*crLHS378;
rLHS(10,15)+=crLHS383;
rLHS(10,16)+=crLHS10*(crLHS384 + crLHS386 + crLHS79*r_DN(2,0));
rLHS(10,17)+=crLHS10*(crLHS387 + crLHS388 + crLHS79*r_DN(2,1));
rLHS(10,18)+=crLHS10*(crLHS389 + crLHS390 + crLHS79*r_DN(2,2));
rLHS(10,19)+=crLHS391;
rLHS(11,0)+=gauss_weight*(-crLHS134*crLHS164 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,0)*r_N[2]*tau_u - crLHS392*r_DN(0,0) - crLHS54);
rLHS(11,1)+=gauss_weight*(crLHS393*crLHS99 + crLHS399 + crLHS92*r_DN(2,0) + crLHS94*r_DN(2,1) + crLHS96*r_DN(2,2));
rLHS(11,2)+=gauss_weight*(crLHS109*r_DN(2,0) + crLHS111*r_DN(2,1) + crLHS114*r_DN(2,2) + crLHS117*crLHS393);
rLHS(11,3)+=gauss_weight*(crLHS118*r_DN(2,0) + crLHS120*r_DN(2,1) + crLHS122*r_DN(2,2) + crLHS125*crLHS393);
rLHS(11,4)+=-crLHS130*crLHS400;
rLHS(11,5)+=gauss_weight*(-crLHS134*crLHS346 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,0)*r_N[2]*tau_u - crLHS313 - crLHS392*r_DN(1,0));
rLHS(11,6)+=gauss_weight*(crLHS135*r_DN(2,0) + crLHS137*r_DN(2,1) + crLHS139*r_DN(2,2) + crLHS142*crLHS393 + crLHS401);
rLHS(11,7)+=gauss_weight*(crLHS147*r_DN(2,0) + crLHS149*r_DN(2,1) + crLHS152*r_DN(2,2) + crLHS154*crLHS393);
rLHS(11,8)+=gauss_weight*(crLHS155*r_DN(2,0) + crLHS157*r_DN(2,1) + crLHS159*r_DN(2,2) + crLHS161*crLHS393);
rLHS(11,9)+=-crLHS163*crLHS400;
rLHS(11,10)+=crLHS402*r_DN(2,0);
rLHS(11,11)+=gauss_weight*(crLHS165*r_DN(2,0) + crLHS167*r_DN(2,1) + crLHS169*r_DN(2,2) + crLHS172*crLHS393 + crLHS404);
rLHS(11,12)+=gauss_weight*(crLHS177*r_DN(2,0) + crLHS179*r_DN(2,1) + crLHS182*r_DN(2,2) + crLHS184*crLHS393);
rLHS(11,13)+=gauss_weight*(crLHS185*r_DN(2,0) + crLHS187*r_DN(2,1) + crLHS189*r_DN(2,2) + crLHS191*crLHS393);
rLHS(11,14)+=-crLHS193*crLHS400;
rLHS(11,15)+=gauss_weight*(-crLHS134*crLHS384 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,0)*r_N[2]*tau_u - crLHS392*r_DN(3,0) - crLHS405);
rLHS(11,16)+=gauss_weight*(crLHS195*r_DN(2,0) + crLHS197*r_DN(2,1) + crLHS199*r_DN(2,2) + crLHS201*crLHS393 + crLHS408);
rLHS(11,17)+=gauss_weight*(crLHS206*r_DN(2,0) + crLHS208*r_DN(2,1) + crLHS211*r_DN(2,2) + crLHS212*crLHS393);
rLHS(11,18)+=gauss_weight*(crLHS213*r_DN(2,0) + crLHS215*r_DN(2,1) + crLHS217*r_DN(2,2) + crLHS218*crLHS393);
rLHS(11,19)+=-crLHS220*crLHS400;
rLHS(12,0)+=gauss_weight*(-crLHS134*crLHS240 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,1)*r_N[2]*tau_u - crLHS392*r_DN(0,1) - crLHS62);
rLHS(12,1)+=gauss_weight*(crLHS221*r_DN(2,1) + crLHS222*r_DN(2,2) + crLHS409*crLHS99 + crLHS94*r_DN(2,0));
rLHS(12,2)+=gauss_weight*(crLHS111*r_DN(2,0) + crLHS117*crLHS409 + crLHS224*r_DN(2,1) + crLHS226*r_DN(2,2) + crLHS399);
rLHS(12,3)+=gauss_weight*(crLHS120*r_DN(2,0) + crLHS125*crLHS409 + crLHS227*r_DN(2,1) + crLHS229*r_DN(2,2));
rLHS(12,4)+=-crLHS130*crLHS410;
rLHS(12,5)+=gauss_weight*(-crLHS134*crLHS356 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,1)*r_N[2]*tau_u - crLHS316 - crLHS392*r_DN(1,1));
rLHS(12,6)+=gauss_weight*(crLHS137*r_DN(2,0) + crLHS142*crLHS409 + crLHS232*r_DN(2,1) + crLHS233*r_DN(2,2));
rLHS(12,7)+=gauss_weight*(crLHS149*r_DN(2,0) + crLHS154*crLHS409 + crLHS234*r_DN(2,1) + crLHS236*r_DN(2,2) + crLHS401);
rLHS(12,8)+=gauss_weight*(crLHS157*r_DN(2,0) + crLHS161*crLHS409 + crLHS237*r_DN(2,1) + crLHS239*r_DN(2,2));
rLHS(12,9)+=-crLHS163*crLHS410;
rLHS(12,10)+=crLHS402*r_DN(2,1);
rLHS(12,11)+=gauss_weight*(crLHS167*r_DN(2,0) + crLHS172*crLHS409 + crLHS241*r_DN(2,1) + crLHS242*r_DN(2,2));
rLHS(12,12)+=gauss_weight*(crLHS179*r_DN(2,0) + crLHS184*crLHS409 + crLHS243*r_DN(2,1) + crLHS245*r_DN(2,2) + crLHS404);
rLHS(12,13)+=gauss_weight*(crLHS187*r_DN(2,0) + crLHS191*crLHS409 + crLHS246*r_DN(2,1) + crLHS248*r_DN(2,2));
rLHS(12,14)+=-crLHS193*crLHS410;
rLHS(12,15)+=gauss_weight*(-crLHS134*crLHS387 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,1)*r_N[2]*tau_u - crLHS392*r_DN(3,1) - crLHS411);
rLHS(12,16)+=gauss_weight*(crLHS197*r_DN(2,0) + crLHS201*crLHS409 + crLHS250*r_DN(2,1) + crLHS251*r_DN(2,2));
rLHS(12,17)+=gauss_weight*(crLHS208*r_DN(2,0) + crLHS212*crLHS409 + crLHS252*r_DN(2,1) + crLHS254*r_DN(2,2) + crLHS408);
rLHS(12,18)+=gauss_weight*(crLHS215*r_DN(2,0) + crLHS218*crLHS409 + crLHS255*r_DN(2,1) + crLHS257*r_DN(2,2));
rLHS(12,19)+=-crLHS220*crLHS410;
rLHS(13,0)+=gauss_weight*(-crLHS134*crLHS267 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,2)*r_N[2]*tau_u - crLHS392*r_DN(0,2) - crLHS64);
rLHS(13,1)+=gauss_weight*(crLHS222*r_DN(2,1) + crLHS258*r_DN(2,2) + crLHS412*crLHS99 + crLHS96*r_DN(2,0));
rLHS(13,2)+=gauss_weight*(crLHS114*r_DN(2,0) + crLHS117*crLHS412 + crLHS226*r_DN(2,1) + crLHS260*r_DN(2,2));
rLHS(13,3)+=gauss_weight*(crLHS122*r_DN(2,0) + crLHS125*crLHS412 + crLHS229*r_DN(2,1) + crLHS261*r_DN(2,2) + crLHS399);
rLHS(13,4)+=-crLHS130*crLHS413;
rLHS(13,5)+=gauss_weight*(-crLHS134*crLHS360 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,2)*r_N[2]*tau_u - crLHS318 - crLHS392*r_DN(1,2));
rLHS(13,6)+=gauss_weight*(crLHS139*r_DN(2,0) + crLHS142*crLHS412 + crLHS233*r_DN(2,1) + crLHS264*r_DN(2,2));
rLHS(13,7)+=gauss_weight*(crLHS152*r_DN(2,0) + crLHS154*crLHS412 + crLHS236*r_DN(2,1) + crLHS265*r_DN(2,2));
rLHS(13,8)+=gauss_weight*(crLHS159*r_DN(2,0) + crLHS161*crLHS412 + crLHS239*r_DN(2,1) + crLHS266*r_DN(2,2) + crLHS401);
rLHS(13,9)+=-crLHS163*crLHS413;
rLHS(13,10)+=crLHS402*r_DN(2,2);
rLHS(13,11)+=gauss_weight*(crLHS169*r_DN(2,0) + crLHS172*crLHS412 + crLHS242*r_DN(2,1) + crLHS268*r_DN(2,2));
rLHS(13,12)+=gauss_weight*(crLHS182*r_DN(2,0) + crLHS184*crLHS412 + crLHS245*r_DN(2,1) + crLHS269*r_DN(2,2));
rLHS(13,13)+=gauss_weight*(crLHS189*r_DN(2,0) + crLHS191*crLHS412 + crLHS248*r_DN(2,1) + crLHS270*r_DN(2,2) + crLHS404);
rLHS(13,14)+=-crLHS193*crLHS413;
rLHS(13,15)+=gauss_weight*(-crLHS134*crLHS389 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(3,2)*r_N[2]*tau_u - crLHS392*r_DN(3,2) - crLHS414);
rLHS(13,16)+=gauss_weight*(crLHS199*r_DN(2,0) + crLHS201*crLHS412 + crLHS251*r_DN(2,1) + crLHS272*r_DN(2,2));
rLHS(13,17)+=gauss_weight*(crLHS211*r_DN(2,0) + crLHS212*crLHS412 + crLHS254*r_DN(2,1) + crLHS273*r_DN(2,2));
rLHS(13,18)+=gauss_weight*(crLHS217*r_DN(2,0) + crLHS218*crLHS412 + crLHS257*r_DN(2,1) + crLHS274*r_DN(2,2) + crLHS408);
rLHS(13,19)+=-crLHS220*crLHS413;
rLHS(14,0)+=0;
rLHS(14,1)+=crLHS292;
rLHS(14,2)+=crLHS293;
rLHS(14,3)+=crLHS294;
rLHS(14,4)+=gauss_weight*(crLHS129*crLHS173 - crLHS277*crLHS415 - crLHS277*crLHS416 + crLHS277*crLHS417 - crLHS277*crLHS418 + crLHS297);
rLHS(14,5)+=0;
rLHS(14,6)+=crLHS367;
rLHS(14,7)+=crLHS368;
rLHS(14,8)+=crLHS369;
rLHS(14,9)+=gauss_weight*(crLHS162*crLHS173 - crLHS290*crLHS415 - crLHS290*crLHS416 + crLHS290*crLHS417 - crLHS290*crLHS418 + crLHS370);
rLHS(14,10)+=0;
rLHS(14,11)+=crLHS419*crLHS97;
rLHS(14,12)+=crLHS115*crLHS419;
rLHS(14,13)+=crLHS123*crLHS419;
rLHS(14,14)+=gauss_weight*(crLHS173*crLHS192 - crLHS296*crLHS415 - crLHS296*crLHS416 + crLHS296*crLHS417 - crLHS296*crLHS418 + crLHS375*kappa + crLHS376*kappa + crLHS377*kappa - crLHS379*dp_th_dt + crLHS403);
rLHS(14,15)+=0;
rLHS(14,16)+=crLHS420;
rLHS(14,17)+=crLHS421;
rLHS(14,18)+=crLHS422;
rLHS(14,19)+=gauss_weight*(crLHS173*crLHS219 - crLHS302*crLHS415 - crLHS302*crLHS416 + crLHS302*crLHS417 - crLHS302*crLHS418 + crLHS423);
rLHS(15,0)+=crLHS71;
rLHS(15,1)+=crLHS10*(crLHS194 + crLHS22*r_DN(3,0) + crLHS74);
rLHS(15,2)+=crLHS10*(crLHS22*r_DN(3,1) + crLHS249 + crLHS81);
rLHS(15,3)+=crLHS10*(crLHS22*r_DN(3,2) + crLHS271 + crLHS83);
rLHS(15,4)+=crLHS85;
rLHS(15,5)+=crLHS325;
rLHS(15,6)+=crLHS10*(crLHS328 + crLHS350 + crLHS41*r_DN(3,0));
rLHS(15,7)+=crLHS10*(crLHS330 + crLHS357 + crLHS41*r_DN(3,1));
rLHS(15,8)+=crLHS10*(crLHS332 + crLHS361 + crLHS41*r_DN(3,2));
rLHS(15,9)+=crLHS333;
rLHS(15,10)+=crLHS383;
rLHS(15,11)+=crLHS10*(crLHS386 + crLHS405 + crLHS61*r_DN(3,0));
rLHS(15,12)+=crLHS10*(crLHS388 + crLHS411 + crLHS61*r_DN(3,1));
rLHS(15,13)+=crLHS10*(crLHS390 + crLHS414 + crLHS61*r_DN(3,2));
rLHS(15,14)+=crLHS391;
rLHS(15,15)+=crLHS11*(crLHS424 + crLHS425 + crLHS426);
rLHS(15,16)+=crLHS10*(-crLHS12*crLHS428 + crLHS79*r_DN(3,0) + r_DN(3,0)*r_N[3]);
rLHS(15,17)+=crLHS10*(-crLHS23*crLHS428 + crLHS79*r_DN(3,1) + r_DN(3,1)*r_N[3]);
rLHS(15,18)+=crLHS10*(-crLHS24*crLHS428 + crLHS79*r_DN(3,2) + r_DN(3,2)*r_N[3]);
rLHS(15,19)+=-crLHS28*crLHS427;
rLHS(16,0)+=gauss_weight*(-crLHS134*crLHS194 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,0)*r_N[3]*tau_u - crLHS429*r_DN(0,0) - crLHS72);
rLHS(16,1)+=gauss_weight*(crLHS430*crLHS99 + crLHS436 + crLHS92*r_DN(3,0) + crLHS94*r_DN(3,1) + crLHS96*r_DN(3,2));
rLHS(16,2)+=gauss_weight*(crLHS109*r_DN(3,0) + crLHS111*r_DN(3,1) + crLHS114*r_DN(3,2) + crLHS117*crLHS430);
rLHS(16,3)+=gauss_weight*(crLHS118*r_DN(3,0) + crLHS120*r_DN(3,1) + crLHS122*r_DN(3,2) + crLHS125*crLHS430);
rLHS(16,4)+=-crLHS130*crLHS437;
rLHS(16,5)+=gauss_weight*(-crLHS134*crLHS350 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,0)*r_N[3]*tau_u - crLHS326 - crLHS429*r_DN(1,0));
rLHS(16,6)+=gauss_weight*(crLHS135*r_DN(3,0) + crLHS137*r_DN(3,1) + crLHS139*r_DN(3,2) + crLHS142*crLHS430 + crLHS438);
rLHS(16,7)+=gauss_weight*(crLHS147*r_DN(3,0) + crLHS149*r_DN(3,1) + crLHS152*r_DN(3,2) + crLHS154*crLHS430);
rLHS(16,8)+=gauss_weight*(crLHS155*r_DN(3,0) + crLHS157*r_DN(3,1) + crLHS159*r_DN(3,2) + crLHS161*crLHS430);
rLHS(16,9)+=-crLHS163*crLHS437;
rLHS(16,10)+=gauss_weight*(-crLHS134*crLHS405 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,0)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,0)*r_N[3]*tau_u - crLHS384 - crLHS429*r_DN(2,0));
rLHS(16,11)+=gauss_weight*(crLHS165*r_DN(3,0) + crLHS167*r_DN(3,1) + crLHS169*r_DN(3,2) + crLHS172*crLHS430 + crLHS439);
rLHS(16,12)+=gauss_weight*(crLHS177*r_DN(3,0) + crLHS179*r_DN(3,1) + crLHS182*r_DN(3,2) + crLHS184*crLHS430);
rLHS(16,13)+=gauss_weight*(crLHS185*r_DN(3,0) + crLHS187*r_DN(3,1) + crLHS189*r_DN(3,2) + crLHS191*crLHS430);
rLHS(16,14)+=-crLHS193*crLHS437;
rLHS(16,15)+=crLHS440*r_DN(3,0);
rLHS(16,16)+=gauss_weight*(crLHS195*r_DN(3,0) + crLHS197*r_DN(3,1) + crLHS199*r_DN(3,2) + crLHS201*crLHS430 + crLHS442);
rLHS(16,17)+=gauss_weight*(crLHS206*r_DN(3,0) + crLHS208*r_DN(3,1) + crLHS211*r_DN(3,2) + crLHS212*crLHS430);
rLHS(16,18)+=gauss_weight*(crLHS213*r_DN(3,0) + crLHS215*r_DN(3,1) + crLHS217*r_DN(3,2) + crLHS218*crLHS430);
rLHS(16,19)+=-crLHS220*crLHS437;
rLHS(17,0)+=gauss_weight*(-crLHS134*crLHS249 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,1)*r_N[3]*tau_u - crLHS429*r_DN(0,1) - crLHS80);
rLHS(17,1)+=gauss_weight*(crLHS221*r_DN(3,1) + crLHS222*r_DN(3,2) + crLHS443*crLHS99 + crLHS94*r_DN(3,0));
rLHS(17,2)+=gauss_weight*(crLHS111*r_DN(3,0) + crLHS117*crLHS443 + crLHS224*r_DN(3,1) + crLHS226*r_DN(3,2) + crLHS436);
rLHS(17,3)+=gauss_weight*(crLHS120*r_DN(3,0) + crLHS125*crLHS443 + crLHS227*r_DN(3,1) + crLHS229*r_DN(3,2));
rLHS(17,4)+=-crLHS130*crLHS444;
rLHS(17,5)+=gauss_weight*(-crLHS134*crLHS357 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,1)*r_N[3]*tau_u - crLHS329 - crLHS429*r_DN(1,1));
rLHS(17,6)+=gauss_weight*(crLHS137*r_DN(3,0) + crLHS142*crLHS443 + crLHS232*r_DN(3,1) + crLHS233*r_DN(3,2));
rLHS(17,7)+=gauss_weight*(crLHS149*r_DN(3,0) + crLHS154*crLHS443 + crLHS234*r_DN(3,1) + crLHS236*r_DN(3,2) + crLHS438);
rLHS(17,8)+=gauss_weight*(crLHS157*r_DN(3,0) + crLHS161*crLHS443 + crLHS237*r_DN(3,1) + crLHS239*r_DN(3,2));
rLHS(17,9)+=-crLHS163*crLHS444;
rLHS(17,10)+=gauss_weight*(-crLHS134*crLHS411 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,1)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,1)*r_N[3]*tau_u - crLHS387 - crLHS429*r_DN(2,1));
rLHS(17,11)+=gauss_weight*(crLHS167*r_DN(3,0) + crLHS172*crLHS443 + crLHS241*r_DN(3,1) + crLHS242*r_DN(3,2));
rLHS(17,12)+=gauss_weight*(crLHS179*r_DN(3,0) + crLHS184*crLHS443 + crLHS243*r_DN(3,1) + crLHS245*r_DN(3,2) + crLHS439);
rLHS(17,13)+=gauss_weight*(crLHS187*r_DN(3,0) + crLHS191*crLHS443 + crLHS246*r_DN(3,1) + crLHS248*r_DN(3,2));
rLHS(17,14)+=-crLHS193*crLHS444;
rLHS(17,15)+=crLHS440*r_DN(3,1);
rLHS(17,16)+=gauss_weight*(crLHS197*r_DN(3,0) + crLHS201*crLHS443 + crLHS250*r_DN(3,1) + crLHS251*r_DN(3,2));
rLHS(17,17)+=gauss_weight*(crLHS208*r_DN(3,0) + crLHS212*crLHS443 + crLHS252*r_DN(3,1) + crLHS254*r_DN(3,2) + crLHS442);
rLHS(17,18)+=gauss_weight*(crLHS215*r_DN(3,0) + crLHS218*crLHS443 + crLHS255*r_DN(3,1) + crLHS257*r_DN(3,2));
rLHS(17,19)+=-crLHS220*crLHS444;
rLHS(18,0)+=gauss_weight*(-crLHS134*crLHS271 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(0,2)*r_N[3]*tau_u - crLHS429*r_DN(0,2) - crLHS82);
rLHS(18,1)+=gauss_weight*(crLHS222*r_DN(3,1) + crLHS258*r_DN(3,2) + crLHS445*crLHS99 + crLHS96*r_DN(3,0));
rLHS(18,2)+=gauss_weight*(crLHS114*r_DN(3,0) + crLHS117*crLHS445 + crLHS226*r_DN(3,1) + crLHS260*r_DN(3,2));
rLHS(18,3)+=gauss_weight*(crLHS122*r_DN(3,0) + crLHS125*crLHS445 + crLHS229*r_DN(3,1) + crLHS261*r_DN(3,2) + crLHS436);
rLHS(18,4)+=-crLHS130*crLHS446;
rLHS(18,5)+=gauss_weight*(-crLHS134*crLHS361 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(1,2)*r_N[3]*tau_u - crLHS331 - crLHS429*r_DN(1,2));
rLHS(18,6)+=gauss_weight*(crLHS139*r_DN(3,0) + crLHS142*crLHS445 + crLHS233*r_DN(3,1) + crLHS264*r_DN(3,2));
rLHS(18,7)+=gauss_weight*(crLHS152*r_DN(3,0) + crLHS154*crLHS445 + crLHS236*r_DN(3,1) + crLHS265*r_DN(3,2));
rLHS(18,8)+=gauss_weight*(crLHS159*r_DN(3,0) + crLHS161*crLHS445 + crLHS239*r_DN(3,1) + crLHS266*r_DN(3,2) + crLHS438);
rLHS(18,9)+=-crLHS163*crLHS446;
rLHS(18,10)+=gauss_weight*(-crLHS134*crLHS414 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,2)*tau_u + crLHS3*crLHS6*crLHS7*crLHS87*gamma*p_th*r_DN(2,2)*r_N[3]*tau_u - crLHS389 - crLHS429*r_DN(2,2));
rLHS(18,11)+=gauss_weight*(crLHS169*r_DN(3,0) + crLHS172*crLHS445 + crLHS242*r_DN(3,1) + crLHS268*r_DN(3,2));
rLHS(18,12)+=gauss_weight*(crLHS182*r_DN(3,0) + crLHS184*crLHS445 + crLHS245*r_DN(3,1) + crLHS269*r_DN(3,2));
rLHS(18,13)+=gauss_weight*(crLHS189*r_DN(3,0) + crLHS191*crLHS445 + crLHS248*r_DN(3,1) + crLHS270*r_DN(3,2) + crLHS439);
rLHS(18,14)+=-crLHS193*crLHS446;
rLHS(18,15)+=crLHS440*r_DN(3,2);
rLHS(18,16)+=gauss_weight*(crLHS199*r_DN(3,0) + crLHS201*crLHS445 + crLHS251*r_DN(3,1) + crLHS272*r_DN(3,2));
rLHS(18,17)+=gauss_weight*(crLHS211*r_DN(3,0) + crLHS212*crLHS445 + crLHS254*r_DN(3,1) + crLHS273*r_DN(3,2));
rLHS(18,18)+=gauss_weight*(crLHS217*r_DN(3,0) + crLHS218*crLHS445 + crLHS257*r_DN(3,1) + crLHS274*r_DN(3,2) + crLHS442);
rLHS(18,19)+=-crLHS220*crLHS446;
rLHS(19,0)+=0;
rLHS(19,1)+=crLHS298;
rLHS(19,2)+=crLHS299;
rLHS(19,3)+=crLHS300;
rLHS(19,4)+=gauss_weight*(crLHS129*crLHS202 - crLHS277*crLHS447 - crLHS277*crLHS448 + crLHS277*crLHS449 - crLHS277*crLHS450 + crLHS303);
rLHS(19,5)+=0;
rLHS(19,6)+=crLHS371;
rLHS(19,7)+=crLHS372;
rLHS(19,8)+=crLHS373;
rLHS(19,9)+=gauss_weight*(crLHS162*crLHS202 - crLHS290*crLHS447 - crLHS290*crLHS448 + crLHS290*crLHS449 - crLHS290*crLHS450 + crLHS374);
rLHS(19,10)+=0;
rLHS(19,11)+=crLHS420;
rLHS(19,12)+=crLHS421;
rLHS(19,13)+=crLHS422;
rLHS(19,14)+=gauss_weight*(crLHS192*crLHS202 - crLHS296*crLHS447 - crLHS296*crLHS448 + crLHS296*crLHS449 - crLHS296*crLHS450 + crLHS423);
rLHS(19,15)+=0;
rLHS(19,16)+=crLHS451*crLHS97;
rLHS(19,17)+=crLHS115*crLHS451;
rLHS(19,18)+=crLHS123*crLHS451;
rLHS(19,19)+=gauss_weight*(crLHS202*crLHS219 - crLHS302*crLHS447 - crLHS302*crLHS448 + crLHS302*crLHS449 - crLHS302*crLHS450 + crLHS424*kappa + crLHS425*kappa + crLHS426*kappa - crLHS428*dp_th_dt + crLHS441);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<3,8>>::ComputeGaussPointLHSContribution(
    LowMachNavierStokesData<3,8>& rData,
    MatrixType& rLHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_C = rData.C;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;

    // Nodal data
    const auto& r_u = rData.Velocity;
    const auto& r_t = rData.Temperature;
    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double,2,4> lin_u_conv = rData.Velocity - rData.MeshVelocity;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add LHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crLHS0 = r_DN(0,0)*r_DN(0,0);
const double crLHS1 = r_DN(0,1)*r_DN(0,1);
const double crLHS2 = r_DN(0,2)*r_DN(0,2);
const double crLHS3 = 1.0/(gamma - 1.0);
const double crLHS4 = crLHS3*gamma*p_th;
const double crLHS5 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2] + r_N[3]*r_t_lin[3] + r_N[4]*r_t_lin[4] + r_N[5]*r_t_lin[5] + r_N[6]*r_t_lin[6] + r_N[7]*r_t_lin[7];
const double crLHS6 = 1.0/crLHS5;
const double crLHS7 = 1.0/c_p;
const double crLHS8 = crLHS6*crLHS7;
const double crLHS9 = crLHS4*crLHS8;
const double crLHS10 = crLHS9*gauss_weight;
const double crLHS11 = crLHS10*tau_u;
const double crLHS12 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2] + r_DN(3,0)*r_t_lin[3] + r_DN(4,0)*r_t_lin[4] + r_DN(5,0)*r_t_lin[5] + r_DN(6,0)*r_t_lin[6] + r_DN(7,0)*r_t_lin[7];
const double crLHS13 = r_N[0]*r_N[0];
const double crLHS14 = crLHS13*crLHS6;
const double crLHS15 = r_N[0]*sigma;
const double crLHS16 = bdf0*r_N[0];
const double crLHS17 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2] + lin_u_conv(3,0)*r_N[3] + lin_u_conv(4,0)*r_N[4] + lin_u_conv(5,0)*r_N[5] + lin_u_conv(6,0)*r_N[6] + lin_u_conv(7,0)*r_N[7];
const double crLHS18 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2] + lin_u_conv(3,1)*r_N[3] + lin_u_conv(4,1)*r_N[4] + lin_u_conv(5,1)*r_N[5] + lin_u_conv(6,1)*r_N[6] + lin_u_conv(7,1)*r_N[7];
const double crLHS19 = lin_u_conv(0,2)*r_N[0] + lin_u_conv(1,2)*r_N[1] + lin_u_conv(2,2)*r_N[2] + lin_u_conv(3,2)*r_N[3] + lin_u_conv(4,2)*r_N[4] + lin_u_conv(5,2)*r_N[5] + lin_u_conv(6,2)*r_N[6] + lin_u_conv(7,2)*r_N[7];
const double crLHS20 = crLHS17*r_DN(0,0) + crLHS18*r_DN(0,1) + crLHS19*r_DN(0,2);
const double crLHS21 = crLHS4*(crLHS16 + crLHS20);
const double crLHS22 = tau_u*(crLHS15 + crLHS21*crLHS8);
const double crLHS23 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2] + r_DN(3,1)*r_t_lin[3] + r_DN(4,1)*r_t_lin[4] + r_DN(5,1)*r_t_lin[5] + r_DN(6,1)*r_t_lin[6] + r_DN(7,1)*r_t_lin[7];
const double crLHS24 = r_DN(0,2)*r_t_lin[0] + r_DN(1,2)*r_t_lin[1] + r_DN(2,2)*r_t_lin[2] + r_DN(3,2)*r_t_lin[3] + r_DN(4,2)*r_t_lin[4] + r_DN(5,2)*r_t_lin[5] + r_DN(6,2)*r_t_lin[6] + r_DN(7,2)*r_t_lin[7];
const double crLHS25 = bdf0*crLHS4;
const double crLHS26 = 1.0/(crLHS5*crLHS5);
const double crLHS27 = crLHS26*crLHS7;
const double crLHS28 = crLHS25*crLHS27*gauss_weight;
const double crLHS29 = r_DN(0,0)*r_DN(1,0);
const double crLHS30 = r_DN(0,1)*r_DN(1,1);
const double crLHS31 = r_DN(0,2)*r_DN(1,2);
const double crLHS32 = crLHS11*(crLHS29 + crLHS30 + crLHS31);
const double crLHS33 = r_DN(1,0)*r_N[0];
const double crLHS34 = crLHS6*r_N[0];
const double crLHS35 = crLHS34*r_N[1];
const double crLHS36 = -crLHS12*crLHS35;
const double crLHS37 = r_N[1]*sigma;
const double crLHS38 = bdf0*r_N[1];
const double crLHS39 = crLHS17*r_DN(1,0) + crLHS18*r_DN(1,1) + crLHS19*r_DN(1,2);
const double crLHS40 = crLHS4*(crLHS38 + crLHS39);
const double crLHS41 = tau_u*(crLHS37 + crLHS40*crLHS8);
const double crLHS42 = r_DN(1,1)*r_N[0];
const double crLHS43 = -crLHS23*crLHS35;
const double crLHS44 = r_DN(1,2)*r_N[0];
const double crLHS45 = -crLHS24*crLHS35;
const double crLHS46 = crLHS4*gauss_weight;
const double crLHS47 = crLHS46*r_N[1];
const double crLHS48 = crLHS16*crLHS27;
const double crLHS49 = -crLHS47*crLHS48;
const double crLHS50 = r_DN(0,0)*r_DN(2,0);
const double crLHS51 = r_DN(0,1)*r_DN(2,1);
const double crLHS52 = r_DN(0,2)*r_DN(2,2);
const double crLHS53 = crLHS11*(crLHS50 + crLHS51 + crLHS52);
const double crLHS54 = r_DN(2,0)*r_N[0];
const double crLHS55 = crLHS34*r_N[2];
const double crLHS56 = -crLHS12*crLHS55;
const double crLHS57 = r_N[2]*sigma;
const double crLHS58 = bdf0*r_N[2];
const double crLHS59 = crLHS17*r_DN(2,0) + crLHS18*r_DN(2,1) + crLHS19*r_DN(2,2);
const double crLHS60 = crLHS4*(crLHS58 + crLHS59);
const double crLHS61 = tau_u*(crLHS57 + crLHS60*crLHS8);
const double crLHS62 = r_DN(2,1)*r_N[0];
const double crLHS63 = -crLHS23*crLHS55;
const double crLHS64 = r_DN(2,2)*r_N[0];
const double crLHS65 = -crLHS24*crLHS55;
const double crLHS66 = crLHS46*r_N[2];
const double crLHS67 = -crLHS48*crLHS66;
const double crLHS68 = r_DN(0,0)*r_DN(3,0);
const double crLHS69 = r_DN(0,1)*r_DN(3,1);
const double crLHS70 = r_DN(0,2)*r_DN(3,2);
const double crLHS71 = crLHS11*(crLHS68 + crLHS69 + crLHS70);
const double crLHS72 = r_DN(3,0)*r_N[0];
const double crLHS73 = crLHS34*r_N[3];
const double crLHS74 = -crLHS12*crLHS73;
const double crLHS75 = r_N[3]*sigma;
const double crLHS76 = bdf0*r_N[3];
const double crLHS77 = crLHS17*r_DN(3,0) + crLHS18*r_DN(3,1) + crLHS19*r_DN(3,2);
const double crLHS78 = crLHS4*(crLHS76 + crLHS77);
const double crLHS79 = tau_u*(crLHS75 + crLHS78*crLHS8);
const double crLHS80 = r_DN(3,1)*r_N[0];
const double crLHS81 = -crLHS23*crLHS73;
const double crLHS82 = r_DN(3,2)*r_N[0];
const double crLHS83 = -crLHS24*crLHS73;
const double crLHS84 = crLHS46*r_N[3];
const double crLHS85 = -crLHS48*crLHS84;
const double crLHS86 = r_DN(0,0)*r_DN(4,0);
const double crLHS87 = r_DN(0,1)*r_DN(4,1);
const double crLHS88 = r_DN(0,2)*r_DN(4,2);
const double crLHS89 = crLHS11*(crLHS86 + crLHS87 + crLHS88);
const double crLHS90 = r_DN(4,0)*r_N[0];
const double crLHS91 = crLHS34*r_N[4];
const double crLHS92 = -crLHS12*crLHS91;
const double crLHS93 = r_N[4]*sigma;
const double crLHS94 = bdf0*r_N[4];
const double crLHS95 = crLHS17*r_DN(4,0) + crLHS18*r_DN(4,1) + crLHS19*r_DN(4,2);
const double crLHS96 = crLHS4*(crLHS94 + crLHS95);
const double crLHS97 = tau_u*(crLHS8*crLHS96 + crLHS93);
const double crLHS98 = r_DN(4,1)*r_N[0];
const double crLHS99 = -crLHS23*crLHS91;
const double crLHS100 = r_DN(4,2)*r_N[0];
const double crLHS101 = -crLHS24*crLHS91;
const double crLHS102 = crLHS46*r_N[4];
const double crLHS103 = -crLHS102*crLHS48;
const double crLHS104 = r_DN(0,0)*r_DN(5,0);
const double crLHS105 = r_DN(0,1)*r_DN(5,1);
const double crLHS106 = r_DN(0,2)*r_DN(5,2);
const double crLHS107 = crLHS11*(crLHS104 + crLHS105 + crLHS106);
const double crLHS108 = r_DN(5,0)*r_N[0];
const double crLHS109 = crLHS34*r_N[5];
const double crLHS110 = -crLHS109*crLHS12;
const double crLHS111 = r_N[5]*sigma;
const double crLHS112 = bdf0*r_N[5];
const double crLHS113 = crLHS17*r_DN(5,0) + crLHS18*r_DN(5,1) + crLHS19*r_DN(5,2);
const double crLHS114 = crLHS4*(crLHS112 + crLHS113);
const double crLHS115 = tau_u*(crLHS111 + crLHS114*crLHS8);
const double crLHS116 = r_DN(5,1)*r_N[0];
const double crLHS117 = -crLHS109*crLHS23;
const double crLHS118 = r_DN(5,2)*r_N[0];
const double crLHS119 = -crLHS109*crLHS24;
const double crLHS120 = crLHS46*r_N[5];
const double crLHS121 = -crLHS120*crLHS48;
const double crLHS122 = r_DN(0,0)*r_DN(6,0);
const double crLHS123 = r_DN(0,1)*r_DN(6,1);
const double crLHS124 = r_DN(0,2)*r_DN(6,2);
const double crLHS125 = crLHS11*(crLHS122 + crLHS123 + crLHS124);
const double crLHS126 = r_DN(6,0)*r_N[0];
const double crLHS127 = crLHS34*r_N[6];
const double crLHS128 = -crLHS12*crLHS127;
const double crLHS129 = r_N[6]*sigma;
const double crLHS130 = bdf0*r_N[6];
const double crLHS131 = crLHS17*r_DN(6,0) + crLHS18*r_DN(6,1) + crLHS19*r_DN(6,2);
const double crLHS132 = crLHS4*(crLHS130 + crLHS131);
const double crLHS133 = tau_u*(crLHS129 + crLHS132*crLHS8);
const double crLHS134 = r_DN(6,1)*r_N[0];
const double crLHS135 = -crLHS127*crLHS23;
const double crLHS136 = r_DN(6,2)*r_N[0];
const double crLHS137 = -crLHS127*crLHS24;
const double crLHS138 = crLHS46*r_N[6];
const double crLHS139 = -crLHS138*crLHS48;
const double crLHS140 = r_DN(0,0)*r_DN(7,0);
const double crLHS141 = r_DN(0,1)*r_DN(7,1);
const double crLHS142 = r_DN(0,2)*r_DN(7,2);
const double crLHS143 = crLHS11*(crLHS140 + crLHS141 + crLHS142);
const double crLHS144 = r_DN(7,0)*r_N[0];
const double crLHS145 = crLHS34*r_N[7];
const double crLHS146 = -crLHS12*crLHS145;
const double crLHS147 = r_N[7]*sigma;
const double crLHS148 = bdf0*r_N[7];
const double crLHS149 = crLHS17*r_DN(7,0) + crLHS18*r_DN(7,1) + crLHS19*r_DN(7,2);
const double crLHS150 = crLHS4*(crLHS148 + crLHS149);
const double crLHS151 = tau_u*(crLHS147 + crLHS150*crLHS8);
const double crLHS152 = r_DN(7,1)*r_N[0];
const double crLHS153 = -crLHS145*crLHS23;
const double crLHS154 = r_DN(7,2)*r_N[0];
const double crLHS155 = -crLHS145*crLHS24;
const double crLHS156 = crLHS46*r_N[7];
const double crLHS157 = -crLHS156*crLHS48;
const double crLHS158 = crLHS15*tau_u;
const double crLHS159 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(0,2)*r_DN(0,2) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(1,2)*r_DN(1,2) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1) + lin_u_conv(2,2)*r_DN(2,2) + lin_u_conv(3,0)*r_DN(3,0) + lin_u_conv(3,1)*r_DN(3,1) + lin_u_conv(3,2)*r_DN(3,2) + lin_u_conv(4,0)*r_DN(4,0) + lin_u_conv(4,1)*r_DN(4,1) + lin_u_conv(4,2)*r_DN(4,2) + lin_u_conv(5,0)*r_DN(5,0) + lin_u_conv(5,1)*r_DN(5,1) + lin_u_conv(5,2)*r_DN(5,2) + lin_u_conv(6,0)*r_DN(6,0) + lin_u_conv(6,1)*r_DN(6,1) + lin_u_conv(6,2)*r_DN(6,2) + lin_u_conv(7,0)*r_DN(7,0) + lin_u_conv(7,1)*r_DN(7,1) + lin_u_conv(7,2)*r_DN(7,2);
const double crLHS160 = crLHS4*(crLHS12*crLHS17 + crLHS18*crLHS23 + crLHS19*crLHS24);
const double crLHS161 = crLHS160*r_N[0];
const double crLHS162 = crLHS27*tau_u;
const double crLHS163 = gauss_weight*(-crLHS158 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[0]*tau_u - crLHS161*crLHS162 + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*tau_u - r_N[0]);
const double crLHS164 = r_C(0,0)*r_DN(0,0) + r_C(0,3)*r_DN(0,1) + r_C(0,5)*r_DN(0,2);
const double crLHS165 = r_C(0,3)*r_DN(0,0);
const double crLHS166 = crLHS165 + r_C(3,3)*r_DN(0,1) + r_C(3,5)*r_DN(0,2);
const double crLHS167 = r_C(0,5)*r_DN(0,0);
const double crLHS168 = crLHS167 + r_C(3,5)*r_DN(0,1) + r_C(5,5)*r_DN(0,2);
const double crLHS169 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2] + r_DN(3,0)*r_t[3] + r_DN(4,0)*r_t[4] + r_DN(5,0)*r_t[5] + r_DN(6,0)*r_t[6] + r_DN(7,0)*r_t[7];
const double crLHS170 = crLHS169*crLHS34;
const double crLHS171 = -crLHS170 + r_DN(0,0);
const double crLHS172 = crLHS9*tau_c;
const double crLHS173 = crLHS172*r_DN(0,0);
const double crLHS174 = crLHS14*crLHS25;
const double crLHS175 = crLHS34*crLHS4;
const double crLHS176 = crLHS175*crLHS7;
const double crLHS177 = crLHS20*crLHS9;
const double crLHS178 = crLHS159*crLHS176;
const double crLHS179 = crLHS161*crLHS27;
const double crLHS180 = crLHS13*sigma - crLHS15*crLHS22 + crLHS174*crLHS7 + crLHS176*crLHS20 + crLHS177*crLHS22 + crLHS178*crLHS22 - crLHS179*crLHS22;
const double crLHS181 = crLHS165 + r_C(0,1)*r_DN(0,1) + r_C(0,4)*r_DN(0,2);
const double crLHS182 = r_C(1,3)*r_DN(0,1);
const double crLHS183 = crLHS182 + r_C(3,3)*r_DN(0,0) + r_C(3,4)*r_DN(0,2);
const double crLHS184 = r_C(3,5)*r_DN(0,0);
const double crLHS185 = r_C(4,5)*r_DN(0,2);
const double crLHS186 = crLHS184 + crLHS185 + r_C(1,5)*r_DN(0,1);
const double crLHS187 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2] + r_DN(3,1)*r_t[3] + r_DN(4,1)*r_t[4] + r_DN(5,1)*r_t[5] + r_DN(6,1)*r_t[6] + r_DN(7,1)*r_t[7];
const double crLHS188 = crLHS187*crLHS34;
const double crLHS189 = -crLHS188 + r_DN(0,1);
const double crLHS190 = crLHS167 + r_C(0,2)*r_DN(0,2) + r_C(0,4)*r_DN(0,1);
const double crLHS191 = r_C(3,4)*r_DN(0,1);
const double crLHS192 = crLHS184 + crLHS191 + r_C(2,3)*r_DN(0,2);
const double crLHS193 = r_C(2,5)*r_DN(0,2);
const double crLHS194 = crLHS193 + r_C(4,5)*r_DN(0,1) + r_C(5,5)*r_DN(0,0);
const double crLHS195 = r_DN(0,2)*r_t[0] + r_DN(1,2)*r_t[1] + r_DN(2,2)*r_t[2] + r_DN(3,2)*r_t[3] + r_DN(4,2)*r_t[4] + r_DN(5,2)*r_t[5] + r_DN(6,2)*r_t[6] + r_DN(7,2)*r_t[7];
const double crLHS196 = crLHS195*crLHS34;
const double crLHS197 = -crLHS196 + r_DN(0,2);
const double crLHS198 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0)) + r_N[3]*(r_u(3,0) - r_u_mesh(3,0)) + r_N[4]*(r_u(4,0) - r_u_mesh(4,0)) + r_N[5]*(r_u(5,0) - r_u_mesh(5,0)) + r_N[6]*(r_u(6,0) - r_u_mesh(6,0)) + r_N[7]*(r_u(7,0) - r_u_mesh(7,0));
const double crLHS199 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1)) + r_N[3]*(r_u(3,1) - r_u_mesh(3,1)) + r_N[4]*(r_u(4,1) - r_u_mesh(4,1)) + r_N[5]*(r_u(5,1) - r_u_mesh(5,1)) + r_N[6]*(r_u(6,1) - r_u_mesh(6,1)) + r_N[7]*(r_u(7,1) - r_u_mesh(7,1));
const double crLHS200 = r_N[0]*(r_u(0,2) - r_u_mesh(0,2)) + r_N[1]*(r_u(1,2) - r_u_mesh(1,2)) + r_N[2]*(r_u(2,2) - r_u_mesh(2,2)) + r_N[3]*(r_u(3,2) - r_u_mesh(3,2)) + r_N[4]*(r_u(4,2) - r_u_mesh(4,2)) + r_N[5]*(r_u(5,2) - r_u_mesh(5,2)) + r_N[6]*(r_u(6,2) - r_u_mesh(6,2)) + r_N[7]*(r_u(7,2) - r_u_mesh(7,2));
const double crLHS201 = crLHS198*r_DN(0,0) + crLHS199*r_DN(0,1) + crLHS200*r_DN(0,2);
const double crLHS202 = crLHS16 + crLHS201;
const double crLHS203 = crLHS27*crLHS46*tau_c;
const double crLHS204 = crLHS203*r_DN(0,0);
const double crLHS205 = r_DN(0,0)*r_N[1];
const double crLHS206 = crLHS160*crLHS162;
const double crLHS207 = r_C(0,0)*r_DN(1,0) + r_C(0,3)*r_DN(1,1) + r_C(0,5)*r_DN(1,2);
const double crLHS208 = r_C(0,3)*r_DN(1,0);
const double crLHS209 = crLHS208 + r_C(3,3)*r_DN(1,1) + r_C(3,5)*r_DN(1,2);
const double crLHS210 = r_C(0,5)*r_DN(1,0);
const double crLHS211 = crLHS210 + r_C(3,5)*r_DN(1,1) + r_C(5,5)*r_DN(1,2);
const double crLHS212 = crLHS6*r_N[1];
const double crLHS213 = crLHS169*crLHS212;
const double crLHS214 = -crLHS213 + r_DN(1,0);
const double crLHS215 = crLHS212*crLHS4;
const double crLHS216 = crLHS16*crLHS215;
const double crLHS217 = crLHS15*r_N[1] + crLHS216*crLHS7;
const double crLHS218 = -crLHS15*crLHS41 + crLHS176*crLHS39 + crLHS177*crLHS41 + crLHS178*crLHS41 - crLHS179*crLHS41 + crLHS217;
const double crLHS219 = crLHS208 + r_C(0,1)*r_DN(1,1) + r_C(0,4)*r_DN(1,2);
const double crLHS220 = r_C(1,3)*r_DN(1,1);
const double crLHS221 = crLHS220 + r_C(3,3)*r_DN(1,0) + r_C(3,4)*r_DN(1,2);
const double crLHS222 = r_C(3,5)*r_DN(1,0);
const double crLHS223 = r_C(4,5)*r_DN(1,2);
const double crLHS224 = crLHS222 + crLHS223 + r_C(1,5)*r_DN(1,1);
const double crLHS225 = crLHS187*crLHS212;
const double crLHS226 = -crLHS225 + r_DN(1,1);
const double crLHS227 = crLHS210 + r_C(0,2)*r_DN(1,2) + r_C(0,4)*r_DN(1,1);
const double crLHS228 = r_C(3,4)*r_DN(1,1);
const double crLHS229 = crLHS222 + crLHS228 + r_C(2,3)*r_DN(1,2);
const double crLHS230 = r_C(2,5)*r_DN(1,2);
const double crLHS231 = crLHS230 + r_C(4,5)*r_DN(1,1) + r_C(5,5)*r_DN(1,0);
const double crLHS232 = crLHS195*crLHS212;
const double crLHS233 = -crLHS232 + r_DN(1,2);
const double crLHS234 = crLHS198*r_DN(1,0) + crLHS199*r_DN(1,1) + crLHS200*r_DN(1,2);
const double crLHS235 = crLHS234 + crLHS38;
const double crLHS236 = r_DN(0,0)*r_N[2];
const double crLHS237 = r_C(0,0)*r_DN(2,0) + r_C(0,3)*r_DN(2,1) + r_C(0,5)*r_DN(2,2);
const double crLHS238 = r_C(0,3)*r_DN(2,0);
const double crLHS239 = crLHS238 + r_C(3,3)*r_DN(2,1) + r_C(3,5)*r_DN(2,2);
const double crLHS240 = r_C(0,5)*r_DN(2,0);
const double crLHS241 = crLHS240 + r_C(3,5)*r_DN(2,1) + r_C(5,5)*r_DN(2,2);
const double crLHS242 = crLHS6*r_N[2];
const double crLHS243 = crLHS169*crLHS242;
const double crLHS244 = -crLHS243 + r_DN(2,0);
const double crLHS245 = crLHS242*crLHS4;
const double crLHS246 = crLHS16*crLHS245;
const double crLHS247 = crLHS15*r_N[2] + crLHS246*crLHS7;
const double crLHS248 = -crLHS15*crLHS61 + crLHS176*crLHS59 + crLHS177*crLHS61 + crLHS178*crLHS61 - crLHS179*crLHS61 + crLHS247;
const double crLHS249 = crLHS238 + r_C(0,1)*r_DN(2,1) + r_C(0,4)*r_DN(2,2);
const double crLHS250 = r_C(1,3)*r_DN(2,1);
const double crLHS251 = crLHS250 + r_C(3,3)*r_DN(2,0) + r_C(3,4)*r_DN(2,2);
const double crLHS252 = r_C(3,5)*r_DN(2,0);
const double crLHS253 = r_C(4,5)*r_DN(2,2);
const double crLHS254 = crLHS252 + crLHS253 + r_C(1,5)*r_DN(2,1);
const double crLHS255 = crLHS187*crLHS242;
const double crLHS256 = -crLHS255 + r_DN(2,1);
const double crLHS257 = crLHS240 + r_C(0,2)*r_DN(2,2) + r_C(0,4)*r_DN(2,1);
const double crLHS258 = r_C(3,4)*r_DN(2,1);
const double crLHS259 = crLHS252 + crLHS258 + r_C(2,3)*r_DN(2,2);
const double crLHS260 = r_C(2,5)*r_DN(2,2);
const double crLHS261 = crLHS260 + r_C(4,5)*r_DN(2,1) + r_C(5,5)*r_DN(2,0);
const double crLHS262 = crLHS195*crLHS242;
const double crLHS263 = -crLHS262 + r_DN(2,2);
const double crLHS264 = crLHS198*r_DN(2,0) + crLHS199*r_DN(2,1) + crLHS200*r_DN(2,2);
const double crLHS265 = crLHS264 + crLHS58;
const double crLHS266 = r_DN(0,0)*r_N[3];
const double crLHS267 = r_C(0,0)*r_DN(3,0) + r_C(0,3)*r_DN(3,1) + r_C(0,5)*r_DN(3,2);
const double crLHS268 = r_C(0,3)*r_DN(3,0);
const double crLHS269 = crLHS268 + r_C(3,3)*r_DN(3,1) + r_C(3,5)*r_DN(3,2);
const double crLHS270 = r_C(0,5)*r_DN(3,0);
const double crLHS271 = crLHS270 + r_C(3,5)*r_DN(3,1) + r_C(5,5)*r_DN(3,2);
const double crLHS272 = crLHS6*r_N[3];
const double crLHS273 = crLHS169*crLHS272;
const double crLHS274 = -crLHS273 + r_DN(3,0);
const double crLHS275 = crLHS272*crLHS4;
const double crLHS276 = crLHS16*crLHS275;
const double crLHS277 = crLHS15*r_N[3] + crLHS276*crLHS7;
const double crLHS278 = -crLHS15*crLHS79 + crLHS176*crLHS77 + crLHS177*crLHS79 + crLHS178*crLHS79 - crLHS179*crLHS79 + crLHS277;
const double crLHS279 = crLHS268 + r_C(0,1)*r_DN(3,1) + r_C(0,4)*r_DN(3,2);
const double crLHS280 = r_C(1,3)*r_DN(3,1);
const double crLHS281 = crLHS280 + r_C(3,3)*r_DN(3,0) + r_C(3,4)*r_DN(3,2);
const double crLHS282 = r_C(3,5)*r_DN(3,0);
const double crLHS283 = r_C(4,5)*r_DN(3,2);
const double crLHS284 = crLHS282 + crLHS283 + r_C(1,5)*r_DN(3,1);
const double crLHS285 = crLHS187*crLHS272;
const double crLHS286 = -crLHS285 + r_DN(3,1);
const double crLHS287 = crLHS270 + r_C(0,2)*r_DN(3,2) + r_C(0,4)*r_DN(3,1);
const double crLHS288 = r_C(3,4)*r_DN(3,1);
const double crLHS289 = crLHS282 + crLHS288 + r_C(2,3)*r_DN(3,2);
const double crLHS290 = r_C(2,5)*r_DN(3,2);
const double crLHS291 = crLHS290 + r_C(4,5)*r_DN(3,1) + r_C(5,5)*r_DN(3,0);
const double crLHS292 = crLHS195*crLHS272;
const double crLHS293 = -crLHS292 + r_DN(3,2);
const double crLHS294 = crLHS198*r_DN(3,0) + crLHS199*r_DN(3,1) + crLHS200*r_DN(3,2);
const double crLHS295 = crLHS294 + crLHS76;
const double crLHS296 = r_DN(0,0)*r_N[4];
const double crLHS297 = r_C(0,0)*r_DN(4,0) + r_C(0,3)*r_DN(4,1) + r_C(0,5)*r_DN(4,2);
const double crLHS298 = r_C(0,3)*r_DN(4,0);
const double crLHS299 = crLHS298 + r_C(3,3)*r_DN(4,1) + r_C(3,5)*r_DN(4,2);
const double crLHS300 = r_C(0,5)*r_DN(4,0);
const double crLHS301 = crLHS300 + r_C(3,5)*r_DN(4,1) + r_C(5,5)*r_DN(4,2);
const double crLHS302 = crLHS6*r_N[4];
const double crLHS303 = crLHS169*crLHS302;
const double crLHS304 = -crLHS303 + r_DN(4,0);
const double crLHS305 = crLHS302*crLHS4;
const double crLHS306 = crLHS16*crLHS305;
const double crLHS307 = crLHS15*r_N[4] + crLHS306*crLHS7;
const double crLHS308 = -crLHS15*crLHS97 + crLHS176*crLHS95 + crLHS177*crLHS97 + crLHS178*crLHS97 - crLHS179*crLHS97 + crLHS307;
const double crLHS309 = crLHS298 + r_C(0,1)*r_DN(4,1) + r_C(0,4)*r_DN(4,2);
const double crLHS310 = r_C(1,3)*r_DN(4,1);
const double crLHS311 = crLHS310 + r_C(3,3)*r_DN(4,0) + r_C(3,4)*r_DN(4,2);
const double crLHS312 = r_C(3,5)*r_DN(4,0);
const double crLHS313 = r_C(4,5)*r_DN(4,2);
const double crLHS314 = crLHS312 + crLHS313 + r_C(1,5)*r_DN(4,1);
const double crLHS315 = crLHS187*crLHS302;
const double crLHS316 = -crLHS315 + r_DN(4,1);
const double crLHS317 = crLHS300 + r_C(0,2)*r_DN(4,2) + r_C(0,4)*r_DN(4,1);
const double crLHS318 = r_C(3,4)*r_DN(4,1);
const double crLHS319 = crLHS312 + crLHS318 + r_C(2,3)*r_DN(4,2);
const double crLHS320 = r_C(2,5)*r_DN(4,2);
const double crLHS321 = crLHS320 + r_C(4,5)*r_DN(4,1) + r_C(5,5)*r_DN(4,0);
const double crLHS322 = crLHS195*crLHS302;
const double crLHS323 = -crLHS322 + r_DN(4,2);
const double crLHS324 = crLHS198*r_DN(4,0) + crLHS199*r_DN(4,1) + crLHS200*r_DN(4,2);
const double crLHS325 = crLHS324 + crLHS94;
const double crLHS326 = r_DN(0,0)*r_N[5];
const double crLHS327 = r_C(0,0)*r_DN(5,0) + r_C(0,3)*r_DN(5,1) + r_C(0,5)*r_DN(5,2);
const double crLHS328 = r_C(0,3)*r_DN(5,0);
const double crLHS329 = crLHS328 + r_C(3,3)*r_DN(5,1) + r_C(3,5)*r_DN(5,2);
const double crLHS330 = r_C(0,5)*r_DN(5,0);
const double crLHS331 = crLHS330 + r_C(3,5)*r_DN(5,1) + r_C(5,5)*r_DN(5,2);
const double crLHS332 = crLHS6*r_N[5];
const double crLHS333 = crLHS169*crLHS332;
const double crLHS334 = -crLHS333 + r_DN(5,0);
const double crLHS335 = crLHS332*crLHS4;
const double crLHS336 = crLHS16*crLHS335;
const double crLHS337 = crLHS15*r_N[5] + crLHS336*crLHS7;
const double crLHS338 = crLHS113*crLHS176 - crLHS115*crLHS15 + crLHS115*crLHS177 + crLHS115*crLHS178 - crLHS115*crLHS179 + crLHS337;
const double crLHS339 = crLHS328 + r_C(0,1)*r_DN(5,1) + r_C(0,4)*r_DN(5,2);
const double crLHS340 = r_C(1,3)*r_DN(5,1);
const double crLHS341 = crLHS340 + r_C(3,3)*r_DN(5,0) + r_C(3,4)*r_DN(5,2);
const double crLHS342 = r_C(3,5)*r_DN(5,0);
const double crLHS343 = r_C(4,5)*r_DN(5,2);
const double crLHS344 = crLHS342 + crLHS343 + r_C(1,5)*r_DN(5,1);
const double crLHS345 = crLHS187*crLHS332;
const double crLHS346 = -crLHS345 + r_DN(5,1);
const double crLHS347 = crLHS330 + r_C(0,2)*r_DN(5,2) + r_C(0,4)*r_DN(5,1);
const double crLHS348 = r_C(3,4)*r_DN(5,1);
const double crLHS349 = crLHS342 + crLHS348 + r_C(2,3)*r_DN(5,2);
const double crLHS350 = r_C(2,5)*r_DN(5,2);
const double crLHS351 = crLHS350 + r_C(4,5)*r_DN(5,1) + r_C(5,5)*r_DN(5,0);
const double crLHS352 = crLHS195*crLHS332;
const double crLHS353 = -crLHS352 + r_DN(5,2);
const double crLHS354 = crLHS198*r_DN(5,0) + crLHS199*r_DN(5,1) + crLHS200*r_DN(5,2);
const double crLHS355 = crLHS112 + crLHS354;
const double crLHS356 = r_DN(0,0)*r_N[6];
const double crLHS357 = r_C(0,0)*r_DN(6,0) + r_C(0,3)*r_DN(6,1) + r_C(0,5)*r_DN(6,2);
const double crLHS358 = r_C(0,3)*r_DN(6,0);
const double crLHS359 = crLHS358 + r_C(3,3)*r_DN(6,1) + r_C(3,5)*r_DN(6,2);
const double crLHS360 = r_C(0,5)*r_DN(6,0);
const double crLHS361 = crLHS360 + r_C(3,5)*r_DN(6,1) + r_C(5,5)*r_DN(6,2);
const double crLHS362 = crLHS6*r_N[6];
const double crLHS363 = crLHS169*crLHS362;
const double crLHS364 = -crLHS363 + r_DN(6,0);
const double crLHS365 = crLHS362*crLHS4;
const double crLHS366 = crLHS16*crLHS365;
const double crLHS367 = crLHS15*r_N[6] + crLHS366*crLHS7;
const double crLHS368 = crLHS131*crLHS176 - crLHS133*crLHS15 + crLHS133*crLHS177 + crLHS133*crLHS178 - crLHS133*crLHS179 + crLHS367;
const double crLHS369 = crLHS358 + r_C(0,1)*r_DN(6,1) + r_C(0,4)*r_DN(6,2);
const double crLHS370 = r_C(1,3)*r_DN(6,1);
const double crLHS371 = crLHS370 + r_C(3,3)*r_DN(6,0) + r_C(3,4)*r_DN(6,2);
const double crLHS372 = r_C(3,5)*r_DN(6,0);
const double crLHS373 = r_C(4,5)*r_DN(6,2);
const double crLHS374 = crLHS372 + crLHS373 + r_C(1,5)*r_DN(6,1);
const double crLHS375 = crLHS187*crLHS362;
const double crLHS376 = -crLHS375 + r_DN(6,1);
const double crLHS377 = crLHS360 + r_C(0,2)*r_DN(6,2) + r_C(0,4)*r_DN(6,1);
const double crLHS378 = r_C(3,4)*r_DN(6,1);
const double crLHS379 = crLHS372 + crLHS378 + r_C(2,3)*r_DN(6,2);
const double crLHS380 = r_C(2,5)*r_DN(6,2);
const double crLHS381 = crLHS380 + r_C(4,5)*r_DN(6,1) + r_C(5,5)*r_DN(6,0);
const double crLHS382 = crLHS195*crLHS362;
const double crLHS383 = -crLHS382 + r_DN(6,2);
const double crLHS384 = crLHS198*r_DN(6,0) + crLHS199*r_DN(6,1) + crLHS200*r_DN(6,2);
const double crLHS385 = crLHS130 + crLHS384;
const double crLHS386 = r_DN(0,0)*r_N[7];
const double crLHS387 = r_C(0,0)*r_DN(7,0) + r_C(0,3)*r_DN(7,1) + r_C(0,5)*r_DN(7,2);
const double crLHS388 = r_C(0,3)*r_DN(7,0);
const double crLHS389 = crLHS388 + r_C(3,3)*r_DN(7,1) + r_C(3,5)*r_DN(7,2);
const double crLHS390 = r_C(0,5)*r_DN(7,0);
const double crLHS391 = crLHS390 + r_C(3,5)*r_DN(7,1) + r_C(5,5)*r_DN(7,2);
const double crLHS392 = crLHS6*r_N[7];
const double crLHS393 = -crLHS169*crLHS392 + r_DN(7,0);
const double crLHS394 = crLHS392*crLHS4;
const double crLHS395 = crLHS16*crLHS394;
const double crLHS396 = crLHS15*r_N[7] + crLHS395*crLHS7;
const double crLHS397 = crLHS149*crLHS176 - crLHS15*crLHS151 + crLHS151*crLHS177 + crLHS151*crLHS178 - crLHS151*crLHS179 + crLHS396;
const double crLHS398 = crLHS388 + r_C(0,1)*r_DN(7,1) + r_C(0,4)*r_DN(7,2);
const double crLHS399 = r_C(1,3)*r_DN(7,1);
const double crLHS400 = crLHS399 + r_C(3,3)*r_DN(7,0) + r_C(3,4)*r_DN(7,2);
const double crLHS401 = r_C(3,5)*r_DN(7,0);
const double crLHS402 = r_C(4,5)*r_DN(7,2);
const double crLHS403 = crLHS401 + crLHS402 + r_C(1,5)*r_DN(7,1);
const double crLHS404 = -crLHS187*crLHS392 + r_DN(7,1);
const double crLHS405 = crLHS390 + r_C(0,2)*r_DN(7,2) + r_C(0,4)*r_DN(7,1);
const double crLHS406 = r_C(3,4)*r_DN(7,1);
const double crLHS407 = crLHS401 + crLHS406 + r_C(2,3)*r_DN(7,2);
const double crLHS408 = r_C(2,5)*r_DN(7,2);
const double crLHS409 = crLHS408 + r_C(4,5)*r_DN(7,1) + r_C(5,5)*r_DN(7,0);
const double crLHS410 = -crLHS195*crLHS392 + r_DN(7,2);
const double crLHS411 = crLHS198*r_DN(7,0) + crLHS199*r_DN(7,1) + crLHS200*r_DN(7,2);
const double crLHS412 = crLHS148 + crLHS411;
const double crLHS413 = crLHS182 + r_C(0,1)*r_DN(0,0) + r_C(1,5)*r_DN(0,2);
const double crLHS414 = crLHS185 + crLHS191 + r_C(0,4)*r_DN(0,0);
const double crLHS415 = crLHS172*r_DN(0,1);
const double crLHS416 = r_C(1,1)*r_DN(0,1) + r_C(1,3)*r_DN(0,0) + r_C(1,4)*r_DN(0,2);
const double crLHS417 = r_C(1,4)*r_DN(0,1);
const double crLHS418 = crLHS417 + r_C(3,4)*r_DN(0,0) + r_C(4,4)*r_DN(0,2);
const double crLHS419 = crLHS417 + r_C(1,2)*r_DN(0,2) + r_C(1,5)*r_DN(0,0);
const double crLHS420 = r_C(2,4)*r_DN(0,2);
const double crLHS421 = crLHS420 + r_C(4,4)*r_DN(0,1) + r_C(4,5)*r_DN(0,0);
const double crLHS422 = crLHS203*r_DN(0,1);
const double crLHS423 = r_DN(0,1)*r_N[1];
const double crLHS424 = crLHS220 + r_C(0,1)*r_DN(1,0) + r_C(1,5)*r_DN(1,2);
const double crLHS425 = crLHS223 + crLHS228 + r_C(0,4)*r_DN(1,0);
const double crLHS426 = r_C(1,1)*r_DN(1,1) + r_C(1,3)*r_DN(1,0) + r_C(1,4)*r_DN(1,2);
const double crLHS427 = r_C(1,4)*r_DN(1,1);
const double crLHS428 = crLHS427 + r_C(3,4)*r_DN(1,0) + r_C(4,4)*r_DN(1,2);
const double crLHS429 = crLHS427 + r_C(1,2)*r_DN(1,2) + r_C(1,5)*r_DN(1,0);
const double crLHS430 = r_C(2,4)*r_DN(1,2);
const double crLHS431 = crLHS430 + r_C(4,4)*r_DN(1,1) + r_C(4,5)*r_DN(1,0);
const double crLHS432 = r_DN(0,1)*r_N[2];
const double crLHS433 = crLHS250 + r_C(0,1)*r_DN(2,0) + r_C(1,5)*r_DN(2,2);
const double crLHS434 = crLHS253 + crLHS258 + r_C(0,4)*r_DN(2,0);
const double crLHS435 = r_C(1,1)*r_DN(2,1) + r_C(1,3)*r_DN(2,0) + r_C(1,4)*r_DN(2,2);
const double crLHS436 = r_C(1,4)*r_DN(2,1);
const double crLHS437 = crLHS436 + r_C(3,4)*r_DN(2,0) + r_C(4,4)*r_DN(2,2);
const double crLHS438 = crLHS436 + r_C(1,2)*r_DN(2,2) + r_C(1,5)*r_DN(2,0);
const double crLHS439 = r_C(2,4)*r_DN(2,2);
const double crLHS440 = crLHS439 + r_C(4,4)*r_DN(2,1) + r_C(4,5)*r_DN(2,0);
const double crLHS441 = r_DN(0,1)*r_N[3];
const double crLHS442 = crLHS280 + r_C(0,1)*r_DN(3,0) + r_C(1,5)*r_DN(3,2);
const double crLHS443 = crLHS283 + crLHS288 + r_C(0,4)*r_DN(3,0);
const double crLHS444 = r_C(1,1)*r_DN(3,1) + r_C(1,3)*r_DN(3,0) + r_C(1,4)*r_DN(3,2);
const double crLHS445 = r_C(1,4)*r_DN(3,1);
const double crLHS446 = crLHS445 + r_C(3,4)*r_DN(3,0) + r_C(4,4)*r_DN(3,2);
const double crLHS447 = crLHS445 + r_C(1,2)*r_DN(3,2) + r_C(1,5)*r_DN(3,0);
const double crLHS448 = r_C(2,4)*r_DN(3,2);
const double crLHS449 = crLHS448 + r_C(4,4)*r_DN(3,1) + r_C(4,5)*r_DN(3,0);
const double crLHS450 = r_DN(0,1)*r_N[4];
const double crLHS451 = crLHS310 + r_C(0,1)*r_DN(4,0) + r_C(1,5)*r_DN(4,2);
const double crLHS452 = crLHS313 + crLHS318 + r_C(0,4)*r_DN(4,0);
const double crLHS453 = r_C(1,1)*r_DN(4,1) + r_C(1,3)*r_DN(4,0) + r_C(1,4)*r_DN(4,2);
const double crLHS454 = r_C(1,4)*r_DN(4,1);
const double crLHS455 = crLHS454 + r_C(3,4)*r_DN(4,0) + r_C(4,4)*r_DN(4,2);
const double crLHS456 = crLHS454 + r_C(1,2)*r_DN(4,2) + r_C(1,5)*r_DN(4,0);
const double crLHS457 = r_C(2,4)*r_DN(4,2);
const double crLHS458 = crLHS457 + r_C(4,4)*r_DN(4,1) + r_C(4,5)*r_DN(4,0);
const double crLHS459 = r_DN(0,1)*r_N[5];
const double crLHS460 = crLHS340 + r_C(0,1)*r_DN(5,0) + r_C(1,5)*r_DN(5,2);
const double crLHS461 = crLHS343 + crLHS348 + r_C(0,4)*r_DN(5,0);
const double crLHS462 = r_C(1,1)*r_DN(5,1) + r_C(1,3)*r_DN(5,0) + r_C(1,4)*r_DN(5,2);
const double crLHS463 = r_C(1,4)*r_DN(5,1);
const double crLHS464 = crLHS463 + r_C(3,4)*r_DN(5,0) + r_C(4,4)*r_DN(5,2);
const double crLHS465 = crLHS463 + r_C(1,2)*r_DN(5,2) + r_C(1,5)*r_DN(5,0);
const double crLHS466 = r_C(2,4)*r_DN(5,2);
const double crLHS467 = crLHS466 + r_C(4,4)*r_DN(5,1) + r_C(4,5)*r_DN(5,0);
const double crLHS468 = r_DN(0,1)*r_N[6];
const double crLHS469 = crLHS370 + r_C(0,1)*r_DN(6,0) + r_C(1,5)*r_DN(6,2);
const double crLHS470 = crLHS373 + crLHS378 + r_C(0,4)*r_DN(6,0);
const double crLHS471 = r_C(1,1)*r_DN(6,1) + r_C(1,3)*r_DN(6,0) + r_C(1,4)*r_DN(6,2);
const double crLHS472 = r_C(1,4)*r_DN(6,1);
const double crLHS473 = crLHS472 + r_C(3,4)*r_DN(6,0) + r_C(4,4)*r_DN(6,2);
const double crLHS474 = crLHS472 + r_C(1,2)*r_DN(6,2) + r_C(1,5)*r_DN(6,0);
const double crLHS475 = r_C(2,4)*r_DN(6,2);
const double crLHS476 = crLHS475 + r_C(4,4)*r_DN(6,1) + r_C(4,5)*r_DN(6,0);
const double crLHS477 = r_DN(0,1)*r_N[7];
const double crLHS478 = crLHS399 + r_C(0,1)*r_DN(7,0) + r_C(1,5)*r_DN(7,2);
const double crLHS479 = crLHS402 + crLHS406 + r_C(0,4)*r_DN(7,0);
const double crLHS480 = r_C(1,1)*r_DN(7,1) + r_C(1,3)*r_DN(7,0) + r_C(1,4)*r_DN(7,2);
const double crLHS481 = r_C(1,4)*r_DN(7,1);
const double crLHS482 = crLHS481 + r_C(3,4)*r_DN(7,0) + r_C(4,4)*r_DN(7,2);
const double crLHS483 = crLHS481 + r_C(1,2)*r_DN(7,2) + r_C(1,5)*r_DN(7,0);
const double crLHS484 = r_C(2,4)*r_DN(7,2);
const double crLHS485 = crLHS484 + r_C(4,4)*r_DN(7,1) + r_C(4,5)*r_DN(7,0);
const double crLHS486 = crLHS193 + r_C(0,2)*r_DN(0,0) + r_C(2,3)*r_DN(0,1);
const double crLHS487 = crLHS172*r_DN(0,2);
const double crLHS488 = crLHS420 + r_C(1,2)*r_DN(0,1) + r_C(2,3)*r_DN(0,0);
const double crLHS489 = r_C(2,2)*r_DN(0,2) + r_C(2,4)*r_DN(0,1) + r_C(2,5)*r_DN(0,0);
const double crLHS490 = crLHS203*r_DN(0,2);
const double crLHS491 = r_DN(0,2)*r_N[1];
const double crLHS492 = crLHS230 + r_C(0,2)*r_DN(1,0) + r_C(2,3)*r_DN(1,1);
const double crLHS493 = crLHS430 + r_C(1,2)*r_DN(1,1) + r_C(2,3)*r_DN(1,0);
const double crLHS494 = r_C(2,2)*r_DN(1,2) + r_C(2,4)*r_DN(1,1) + r_C(2,5)*r_DN(1,0);
const double crLHS495 = r_DN(0,2)*r_N[2];
const double crLHS496 = crLHS260 + r_C(0,2)*r_DN(2,0) + r_C(2,3)*r_DN(2,1);
const double crLHS497 = crLHS439 + r_C(1,2)*r_DN(2,1) + r_C(2,3)*r_DN(2,0);
const double crLHS498 = r_C(2,2)*r_DN(2,2) + r_C(2,4)*r_DN(2,1) + r_C(2,5)*r_DN(2,0);
const double crLHS499 = r_DN(0,2)*r_N[3];
const double crLHS500 = crLHS290 + r_C(0,2)*r_DN(3,0) + r_C(2,3)*r_DN(3,1);
const double crLHS501 = crLHS448 + r_C(1,2)*r_DN(3,1) + r_C(2,3)*r_DN(3,0);
const double crLHS502 = r_C(2,2)*r_DN(3,2) + r_C(2,4)*r_DN(3,1) + r_C(2,5)*r_DN(3,0);
const double crLHS503 = r_DN(0,2)*r_N[4];
const double crLHS504 = crLHS320 + r_C(0,2)*r_DN(4,0) + r_C(2,3)*r_DN(4,1);
const double crLHS505 = crLHS457 + r_C(1,2)*r_DN(4,1) + r_C(2,3)*r_DN(4,0);
const double crLHS506 = r_C(2,2)*r_DN(4,2) + r_C(2,4)*r_DN(4,1) + r_C(2,5)*r_DN(4,0);
const double crLHS507 = r_DN(0,2)*r_N[5];
const double crLHS508 = crLHS350 + r_C(0,2)*r_DN(5,0) + r_C(2,3)*r_DN(5,1);
const double crLHS509 = crLHS466 + r_C(1,2)*r_DN(5,1) + r_C(2,3)*r_DN(5,0);
const double crLHS510 = r_C(2,2)*r_DN(5,2) + r_C(2,4)*r_DN(5,1) + r_C(2,5)*r_DN(5,0);
const double crLHS511 = r_DN(0,2)*r_N[6];
const double crLHS512 = crLHS380 + r_C(0,2)*r_DN(6,0) + r_C(2,3)*r_DN(6,1);
const double crLHS513 = crLHS475 + r_C(1,2)*r_DN(6,1) + r_C(2,3)*r_DN(6,0);
const double crLHS514 = r_C(2,2)*r_DN(6,2) + r_C(2,4)*r_DN(6,1) + r_C(2,5)*r_DN(6,0);
const double crLHS515 = r_DN(0,2)*r_N[7];
const double crLHS516 = crLHS408 + r_C(0,2)*r_DN(7,0) + r_C(2,3)*r_DN(7,1);
const double crLHS517 = crLHS484 + r_C(1,2)*r_DN(7,1) + r_C(2,3)*r_DN(7,0);
const double crLHS518 = r_C(2,2)*r_DN(7,2) + r_C(2,4)*r_DN(7,1) + r_C(2,5)*r_DN(7,0);
const double crLHS519 = crLHS14*crLHS46;
const double crLHS520 = dp_th_dt*r_N[0];
const double crLHS521 = -crLHS21 + crLHS520;
const double crLHS522 = crLHS26*tau_t;
const double crLHS523 = crLHS520*crLHS522;
const double crLHS524 = crLHS4*crLHS522;
const double crLHS525 = crLHS159*crLHS524;
const double crLHS526 = crLHS525*r_N[0];
const double crLHS527 = crLHS20*crLHS524;
const double crLHS528 = tau_t*1.0/(crLHS5*crLHS5*crLHS5);
const double crLHS529 = crLHS161*crLHS528;
const double crLHS530 = crLHS170*crLHS47;
const double crLHS531 = crLHS188*crLHS47;
const double crLHS532 = crLHS196*crLHS47;
const double crLHS533 = dp_th_dt*r_N[1];
const double crLHS534 = -crLHS40 + crLHS533;
const double crLHS535 = -crLHS212*crLHS520 + crLHS216 + crLHS29*kappa + crLHS30*kappa + crLHS31*kappa;
const double crLHS536 = crLHS170*crLHS66;
const double crLHS537 = crLHS188*crLHS66;
const double crLHS538 = crLHS196*crLHS66;
const double crLHS539 = dp_th_dt*r_N[2];
const double crLHS540 = crLHS539 - crLHS60;
const double crLHS541 = -crLHS242*crLHS520 + crLHS246 + crLHS50*kappa + crLHS51*kappa + crLHS52*kappa;
const double crLHS542 = crLHS170*crLHS84;
const double crLHS543 = crLHS188*crLHS84;
const double crLHS544 = crLHS196*crLHS84;
const double crLHS545 = dp_th_dt*r_N[3];
const double crLHS546 = crLHS545 - crLHS78;
const double crLHS547 = -crLHS272*crLHS520 + crLHS276 + crLHS68*kappa + crLHS69*kappa + crLHS70*kappa;
const double crLHS548 = crLHS102*crLHS170;
const double crLHS549 = crLHS102*crLHS188;
const double crLHS550 = crLHS102*crLHS196;
const double crLHS551 = dp_th_dt*r_N[4];
const double crLHS552 = crLHS551 - crLHS96;
const double crLHS553 = -crLHS302*crLHS520 + crLHS306 + crLHS86*kappa + crLHS87*kappa + crLHS88*kappa;
const double crLHS554 = crLHS120*crLHS170;
const double crLHS555 = crLHS120*crLHS188;
const double crLHS556 = crLHS120*crLHS196;
const double crLHS557 = dp_th_dt*r_N[5];
const double crLHS558 = -crLHS114 + crLHS557;
const double crLHS559 = crLHS104*kappa + crLHS105*kappa + crLHS106*kappa - crLHS332*crLHS520 + crLHS336;
const double crLHS560 = crLHS138*crLHS170;
const double crLHS561 = crLHS138*crLHS188;
const double crLHS562 = crLHS138*crLHS196;
const double crLHS563 = dp_th_dt*r_N[6];
const double crLHS564 = -crLHS132 + crLHS563;
const double crLHS565 = crLHS122*kappa + crLHS123*kappa + crLHS124*kappa - crLHS362*crLHS520 + crLHS366;
const double crLHS566 = crLHS156*crLHS170;
const double crLHS567 = crLHS156*crLHS188;
const double crLHS568 = crLHS156*crLHS196;
const double crLHS569 = dp_th_dt*r_N[7];
const double crLHS570 = -crLHS150 + crLHS569;
const double crLHS571 = crLHS140*kappa + crLHS141*kappa + crLHS142*kappa - crLHS392*crLHS520 + crLHS395;
const double crLHS572 = r_DN(1,0)*r_DN(1,0);
const double crLHS573 = r_DN(1,1)*r_DN(1,1);
const double crLHS574 = r_DN(1,2)*r_DN(1,2);
const double crLHS575 = r_N[1]*r_N[1];
const double crLHS576 = crLHS575*crLHS6;
const double crLHS577 = r_DN(1,0)*r_DN(2,0);
const double crLHS578 = r_DN(1,1)*r_DN(2,1);
const double crLHS579 = r_DN(1,2)*r_DN(2,2);
const double crLHS580 = crLHS11*(crLHS577 + crLHS578 + crLHS579);
const double crLHS581 = r_DN(2,0)*r_N[1];
const double crLHS582 = crLHS212*r_N[2];
const double crLHS583 = -crLHS12*crLHS582;
const double crLHS584 = r_DN(2,1)*r_N[1];
const double crLHS585 = -crLHS23*crLHS582;
const double crLHS586 = r_DN(2,2)*r_N[1];
const double crLHS587 = -crLHS24*crLHS582;
const double crLHS588 = crLHS27*crLHS38;
const double crLHS589 = -crLHS588*crLHS66;
const double crLHS590 = r_DN(1,0)*r_DN(3,0);
const double crLHS591 = r_DN(1,1)*r_DN(3,1);
const double crLHS592 = r_DN(1,2)*r_DN(3,2);
const double crLHS593 = crLHS11*(crLHS590 + crLHS591 + crLHS592);
const double crLHS594 = r_DN(3,0)*r_N[1];
const double crLHS595 = crLHS212*r_N[3];
const double crLHS596 = -crLHS12*crLHS595;
const double crLHS597 = r_DN(3,1)*r_N[1];
const double crLHS598 = -crLHS23*crLHS595;
const double crLHS599 = r_DN(3,2)*r_N[1];
const double crLHS600 = -crLHS24*crLHS595;
const double crLHS601 = -crLHS588*crLHS84;
const double crLHS602 = r_DN(1,0)*r_DN(4,0);
const double crLHS603 = r_DN(1,1)*r_DN(4,1);
const double crLHS604 = r_DN(1,2)*r_DN(4,2);
const double crLHS605 = crLHS11*(crLHS602 + crLHS603 + crLHS604);
const double crLHS606 = r_DN(4,0)*r_N[1];
const double crLHS607 = crLHS212*r_N[4];
const double crLHS608 = -crLHS12*crLHS607;
const double crLHS609 = r_DN(4,1)*r_N[1];
const double crLHS610 = -crLHS23*crLHS607;
const double crLHS611 = r_DN(4,2)*r_N[1];
const double crLHS612 = -crLHS24*crLHS607;
const double crLHS613 = -crLHS102*crLHS588;
const double crLHS614 = r_DN(1,0)*r_DN(5,0);
const double crLHS615 = r_DN(1,1)*r_DN(5,1);
const double crLHS616 = r_DN(1,2)*r_DN(5,2);
const double crLHS617 = crLHS11*(crLHS614 + crLHS615 + crLHS616);
const double crLHS618 = r_DN(5,0)*r_N[1];
const double crLHS619 = crLHS212*r_N[5];
const double crLHS620 = -crLHS12*crLHS619;
const double crLHS621 = r_DN(5,1)*r_N[1];
const double crLHS622 = -crLHS23*crLHS619;
const double crLHS623 = r_DN(5,2)*r_N[1];
const double crLHS624 = -crLHS24*crLHS619;
const double crLHS625 = -crLHS120*crLHS588;
const double crLHS626 = r_DN(1,0)*r_DN(6,0);
const double crLHS627 = r_DN(1,1)*r_DN(6,1);
const double crLHS628 = r_DN(1,2)*r_DN(6,2);
const double crLHS629 = crLHS11*(crLHS626 + crLHS627 + crLHS628);
const double crLHS630 = r_DN(6,0)*r_N[1];
const double crLHS631 = crLHS212*r_N[6];
const double crLHS632 = -crLHS12*crLHS631;
const double crLHS633 = r_DN(6,1)*r_N[1];
const double crLHS634 = -crLHS23*crLHS631;
const double crLHS635 = r_DN(6,2)*r_N[1];
const double crLHS636 = -crLHS24*crLHS631;
const double crLHS637 = -crLHS138*crLHS588;
const double crLHS638 = r_DN(1,0)*r_DN(7,0);
const double crLHS639 = r_DN(1,1)*r_DN(7,1);
const double crLHS640 = r_DN(1,2)*r_DN(7,2);
const double crLHS641 = crLHS11*(crLHS638 + crLHS639 + crLHS640);
const double crLHS642 = r_DN(7,0)*r_N[1];
const double crLHS643 = crLHS212*r_N[7];
const double crLHS644 = -crLHS12*crLHS643;
const double crLHS645 = r_DN(7,1)*r_N[1];
const double crLHS646 = -crLHS23*crLHS643;
const double crLHS647 = r_DN(7,2)*r_N[1];
const double crLHS648 = -crLHS24*crLHS643;
const double crLHS649 = -crLHS156*crLHS588;
const double crLHS650 = crLHS37*tau_u;
const double crLHS651 = crLHS172*r_DN(1,0);
const double crLHS652 = crLHS215*crLHS7;
const double crLHS653 = crLHS39*crLHS9;
const double crLHS654 = crLHS159*crLHS652;
const double crLHS655 = crLHS160*r_N[1];
const double crLHS656 = crLHS27*crLHS655;
const double crLHS657 = crLHS20*crLHS652 + crLHS217 - crLHS22*crLHS37 + crLHS22*crLHS653 + crLHS22*crLHS654 - crLHS22*crLHS656;
const double crLHS658 = crLHS203*r_DN(1,0);
const double crLHS659 = gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[1]*tau_u - crLHS162*crLHS655 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*tau_u - crLHS650 - r_N[1]);
const double crLHS660 = crLHS25*crLHS576;
const double crLHS661 = -crLHS37*crLHS41 + crLHS39*crLHS652 + crLHS41*crLHS653 + crLHS41*crLHS654 - crLHS41*crLHS656 + crLHS575*sigma + crLHS660*crLHS7;
const double crLHS662 = r_DN(1,0)*r_N[2];
const double crLHS663 = crLHS245*crLHS38;
const double crLHS664 = crLHS37*r_N[2] + crLHS663*crLHS7;
const double crLHS665 = -crLHS37*crLHS61 + crLHS59*crLHS652 + crLHS61*crLHS653 + crLHS61*crLHS654 - crLHS61*crLHS656 + crLHS664;
const double crLHS666 = r_DN(1,0)*r_N[3];
const double crLHS667 = crLHS275*crLHS38;
const double crLHS668 = crLHS37*r_N[3] + crLHS667*crLHS7;
const double crLHS669 = -crLHS37*crLHS79 + crLHS652*crLHS77 + crLHS653*crLHS79 + crLHS654*crLHS79 - crLHS656*crLHS79 + crLHS668;
const double crLHS670 = r_DN(1,0)*r_N[4];
const double crLHS671 = crLHS305*crLHS38;
const double crLHS672 = crLHS37*r_N[4] + crLHS671*crLHS7;
const double crLHS673 = -crLHS37*crLHS97 + crLHS652*crLHS95 + crLHS653*crLHS97 + crLHS654*crLHS97 - crLHS656*crLHS97 + crLHS672;
const double crLHS674 = r_DN(1,0)*r_N[5];
const double crLHS675 = crLHS335*crLHS38;
const double crLHS676 = crLHS37*r_N[5] + crLHS675*crLHS7;
const double crLHS677 = crLHS113*crLHS652 - crLHS115*crLHS37 + crLHS115*crLHS653 + crLHS115*crLHS654 - crLHS115*crLHS656 + crLHS676;
const double crLHS678 = r_DN(1,0)*r_N[6];
const double crLHS679 = crLHS365*crLHS38;
const double crLHS680 = crLHS37*r_N[6] + crLHS679*crLHS7;
const double crLHS681 = crLHS131*crLHS652 - crLHS133*crLHS37 + crLHS133*crLHS653 + crLHS133*crLHS654 - crLHS133*crLHS656 + crLHS680;
const double crLHS682 = r_DN(1,0)*r_N[7];
const double crLHS683 = crLHS38*crLHS394;
const double crLHS684 = crLHS37*r_N[7] + crLHS683*crLHS7;
const double crLHS685 = crLHS149*crLHS652 - crLHS151*crLHS37 + crLHS151*crLHS653 + crLHS151*crLHS654 - crLHS151*crLHS656 + crLHS684;
const double crLHS686 = crLHS172*r_DN(1,1);
const double crLHS687 = crLHS203*r_DN(1,1);
const double crLHS688 = r_DN(1,1)*r_N[2];
const double crLHS689 = r_DN(1,1)*r_N[3];
const double crLHS690 = r_DN(1,1)*r_N[4];
const double crLHS691 = r_DN(1,1)*r_N[5];
const double crLHS692 = r_DN(1,1)*r_N[6];
const double crLHS693 = r_DN(1,1)*r_N[7];
const double crLHS694 = crLHS172*r_DN(1,2);
const double crLHS695 = crLHS203*r_DN(1,2);
const double crLHS696 = r_DN(1,2)*r_N[2];
const double crLHS697 = r_DN(1,2)*r_N[3];
const double crLHS698 = r_DN(1,2)*r_N[4];
const double crLHS699 = r_DN(1,2)*r_N[5];
const double crLHS700 = r_DN(1,2)*r_N[6];
const double crLHS701 = r_DN(1,2)*r_N[7];
const double crLHS702 = crLHS522*crLHS533;
const double crLHS703 = crLHS39*crLHS524;
const double crLHS704 = crLHS528*crLHS655;
const double crLHS705 = crLHS525*r_N[1];
const double crLHS706 = crLHS46*crLHS576;
const double crLHS707 = crLHS213*crLHS66;
const double crLHS708 = crLHS225*crLHS66;
const double crLHS709 = crLHS232*crLHS66;
const double crLHS710 = -crLHS242*crLHS533 + crLHS577*kappa + crLHS578*kappa + crLHS579*kappa + crLHS663;
const double crLHS711 = crLHS213*crLHS84;
const double crLHS712 = crLHS225*crLHS84;
const double crLHS713 = crLHS232*crLHS84;
const double crLHS714 = -crLHS272*crLHS533 + crLHS590*kappa + crLHS591*kappa + crLHS592*kappa + crLHS667;
const double crLHS715 = crLHS102*crLHS213;
const double crLHS716 = crLHS102*crLHS225;
const double crLHS717 = crLHS102*crLHS232;
const double crLHS718 = -crLHS302*crLHS533 + crLHS602*kappa + crLHS603*kappa + crLHS604*kappa + crLHS671;
const double crLHS719 = crLHS120*crLHS213;
const double crLHS720 = crLHS120*crLHS225;
const double crLHS721 = crLHS120*crLHS232;
const double crLHS722 = -crLHS332*crLHS533 + crLHS614*kappa + crLHS615*kappa + crLHS616*kappa + crLHS675;
const double crLHS723 = crLHS138*crLHS213;
const double crLHS724 = crLHS138*crLHS225;
const double crLHS725 = crLHS138*crLHS232;
const double crLHS726 = -crLHS362*crLHS533 + crLHS626*kappa + crLHS627*kappa + crLHS628*kappa + crLHS679;
const double crLHS727 = crLHS156*crLHS213;
const double crLHS728 = crLHS156*crLHS225;
const double crLHS729 = crLHS156*crLHS232;
const double crLHS730 = -crLHS392*crLHS533 + crLHS638*kappa + crLHS639*kappa + crLHS640*kappa + crLHS683;
const double crLHS731 = r_DN(2,0)*r_DN(2,0);
const double crLHS732 = r_DN(2,1)*r_DN(2,1);
const double crLHS733 = r_DN(2,2)*r_DN(2,2);
const double crLHS734 = r_N[2]*r_N[2];
const double crLHS735 = crLHS6*crLHS734;
const double crLHS736 = r_DN(2,0)*r_DN(3,0);
const double crLHS737 = r_DN(2,1)*r_DN(3,1);
const double crLHS738 = r_DN(2,2)*r_DN(3,2);
const double crLHS739 = crLHS11*(crLHS736 + crLHS737 + crLHS738);
const double crLHS740 = r_DN(3,0)*r_N[2];
const double crLHS741 = crLHS242*r_N[3];
const double crLHS742 = -crLHS12*crLHS741;
const double crLHS743 = r_DN(3,1)*r_N[2];
const double crLHS744 = -crLHS23*crLHS741;
const double crLHS745 = r_DN(3,2)*r_N[2];
const double crLHS746 = -crLHS24*crLHS741;
const double crLHS747 = crLHS27*crLHS58;
const double crLHS748 = -crLHS747*crLHS84;
const double crLHS749 = r_DN(2,0)*r_DN(4,0);
const double crLHS750 = r_DN(2,1)*r_DN(4,1);
const double crLHS751 = r_DN(2,2)*r_DN(4,2);
const double crLHS752 = crLHS11*(crLHS749 + crLHS750 + crLHS751);
const double crLHS753 = r_DN(4,0)*r_N[2];
const double crLHS754 = crLHS242*r_N[4];
const double crLHS755 = -crLHS12*crLHS754;
const double crLHS756 = r_DN(4,1)*r_N[2];
const double crLHS757 = -crLHS23*crLHS754;
const double crLHS758 = r_DN(4,2)*r_N[2];
const double crLHS759 = -crLHS24*crLHS754;
const double crLHS760 = -crLHS102*crLHS747;
const double crLHS761 = r_DN(2,0)*r_DN(5,0);
const double crLHS762 = r_DN(2,1)*r_DN(5,1);
const double crLHS763 = r_DN(2,2)*r_DN(5,2);
const double crLHS764 = crLHS11*(crLHS761 + crLHS762 + crLHS763);
const double crLHS765 = r_DN(5,0)*r_N[2];
const double crLHS766 = crLHS242*r_N[5];
const double crLHS767 = -crLHS12*crLHS766;
const double crLHS768 = r_DN(5,1)*r_N[2];
const double crLHS769 = -crLHS23*crLHS766;
const double crLHS770 = r_DN(5,2)*r_N[2];
const double crLHS771 = -crLHS24*crLHS766;
const double crLHS772 = -crLHS120*crLHS747;
const double crLHS773 = r_DN(2,0)*r_DN(6,0);
const double crLHS774 = r_DN(2,1)*r_DN(6,1);
const double crLHS775 = r_DN(2,2)*r_DN(6,2);
const double crLHS776 = crLHS11*(crLHS773 + crLHS774 + crLHS775);
const double crLHS777 = r_DN(6,0)*r_N[2];
const double crLHS778 = crLHS242*r_N[6];
const double crLHS779 = -crLHS12*crLHS778;
const double crLHS780 = r_DN(6,1)*r_N[2];
const double crLHS781 = -crLHS23*crLHS778;
const double crLHS782 = r_DN(6,2)*r_N[2];
const double crLHS783 = -crLHS24*crLHS778;
const double crLHS784 = -crLHS138*crLHS747;
const double crLHS785 = r_DN(2,0)*r_DN(7,0);
const double crLHS786 = r_DN(2,1)*r_DN(7,1);
const double crLHS787 = r_DN(2,2)*r_DN(7,2);
const double crLHS788 = crLHS11*(crLHS785 + crLHS786 + crLHS787);
const double crLHS789 = r_DN(7,0)*r_N[2];
const double crLHS790 = crLHS242*r_N[7];
const double crLHS791 = -crLHS12*crLHS790;
const double crLHS792 = r_DN(7,1)*r_N[2];
const double crLHS793 = -crLHS23*crLHS790;
const double crLHS794 = r_DN(7,2)*r_N[2];
const double crLHS795 = -crLHS24*crLHS790;
const double crLHS796 = -crLHS156*crLHS747;
const double crLHS797 = crLHS57*tau_u;
const double crLHS798 = crLHS172*r_DN(2,0);
const double crLHS799 = crLHS245*crLHS7;
const double crLHS800 = crLHS59*crLHS9;
const double crLHS801 = crLHS159*crLHS799;
const double crLHS802 = crLHS160*r_N[2];
const double crLHS803 = crLHS27*crLHS802;
const double crLHS804 = crLHS20*crLHS799 - crLHS22*crLHS57 + crLHS22*crLHS800 + crLHS22*crLHS801 - crLHS22*crLHS803 + crLHS247;
const double crLHS805 = crLHS203*r_DN(2,0);
const double crLHS806 = crLHS39*crLHS799 - crLHS41*crLHS57 + crLHS41*crLHS800 + crLHS41*crLHS801 - crLHS41*crLHS803 + crLHS664;
const double crLHS807 = gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[2]*tau_u - crLHS162*crLHS802 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*tau_u - crLHS797 - r_N[2]);
const double crLHS808 = crLHS25*crLHS735;
const double crLHS809 = -crLHS57*crLHS61 + crLHS59*crLHS799 + crLHS61*crLHS800 + crLHS61*crLHS801 - crLHS61*crLHS803 + crLHS7*crLHS808 + crLHS734*sigma;
const double crLHS810 = r_DN(2,0)*r_N[3];
const double crLHS811 = crLHS275*crLHS58;
const double crLHS812 = crLHS57*r_N[3] + crLHS7*crLHS811;
const double crLHS813 = -crLHS57*crLHS79 + crLHS77*crLHS799 + crLHS79*crLHS800 + crLHS79*crLHS801 - crLHS79*crLHS803 + crLHS812;
const double crLHS814 = r_DN(2,0)*r_N[4];
const double crLHS815 = crLHS305*crLHS58;
const double crLHS816 = crLHS57*r_N[4] + crLHS7*crLHS815;
const double crLHS817 = -crLHS57*crLHS97 + crLHS799*crLHS95 + crLHS800*crLHS97 + crLHS801*crLHS97 - crLHS803*crLHS97 + crLHS816;
const double crLHS818 = r_DN(2,0)*r_N[5];
const double crLHS819 = crLHS335*crLHS58;
const double crLHS820 = crLHS57*r_N[5] + crLHS7*crLHS819;
const double crLHS821 = crLHS113*crLHS799 - crLHS115*crLHS57 + crLHS115*crLHS800 + crLHS115*crLHS801 - crLHS115*crLHS803 + crLHS820;
const double crLHS822 = r_DN(2,0)*r_N[6];
const double crLHS823 = crLHS365*crLHS58;
const double crLHS824 = crLHS57*r_N[6] + crLHS7*crLHS823;
const double crLHS825 = crLHS131*crLHS799 - crLHS133*crLHS57 + crLHS133*crLHS800 + crLHS133*crLHS801 - crLHS133*crLHS803 + crLHS824;
const double crLHS826 = r_DN(2,0)*r_N[7];
const double crLHS827 = crLHS394*crLHS58;
const double crLHS828 = crLHS57*r_N[7] + crLHS7*crLHS827;
const double crLHS829 = crLHS149*crLHS799 - crLHS151*crLHS57 + crLHS151*crLHS800 + crLHS151*crLHS801 - crLHS151*crLHS803 + crLHS828;
const double crLHS830 = crLHS172*r_DN(2,1);
const double crLHS831 = crLHS203*r_DN(2,1);
const double crLHS832 = r_DN(2,1)*r_N[3];
const double crLHS833 = r_DN(2,1)*r_N[4];
const double crLHS834 = r_DN(2,1)*r_N[5];
const double crLHS835 = r_DN(2,1)*r_N[6];
const double crLHS836 = r_DN(2,1)*r_N[7];
const double crLHS837 = crLHS172*r_DN(2,2);
const double crLHS838 = crLHS203*r_DN(2,2);
const double crLHS839 = r_DN(2,2)*r_N[3];
const double crLHS840 = r_DN(2,2)*r_N[4];
const double crLHS841 = r_DN(2,2)*r_N[5];
const double crLHS842 = r_DN(2,2)*r_N[6];
const double crLHS843 = r_DN(2,2)*r_N[7];
const double crLHS844 = crLHS522*crLHS539;
const double crLHS845 = crLHS524*crLHS59;
const double crLHS846 = crLHS528*crLHS802;
const double crLHS847 = crLHS525*r_N[2];
const double crLHS848 = crLHS46*crLHS735;
const double crLHS849 = crLHS243*crLHS84;
const double crLHS850 = crLHS255*crLHS84;
const double crLHS851 = crLHS262*crLHS84;
const double crLHS852 = -crLHS272*crLHS539 + crLHS736*kappa + crLHS737*kappa + crLHS738*kappa + crLHS811;
const double crLHS853 = crLHS102*crLHS243;
const double crLHS854 = crLHS102*crLHS255;
const double crLHS855 = crLHS102*crLHS262;
const double crLHS856 = -crLHS302*crLHS539 + crLHS749*kappa + crLHS750*kappa + crLHS751*kappa + crLHS815;
const double crLHS857 = crLHS120*crLHS243;
const double crLHS858 = crLHS120*crLHS255;
const double crLHS859 = crLHS120*crLHS262;
const double crLHS860 = -crLHS332*crLHS539 + crLHS761*kappa + crLHS762*kappa + crLHS763*kappa + crLHS819;
const double crLHS861 = crLHS138*crLHS243;
const double crLHS862 = crLHS138*crLHS255;
const double crLHS863 = crLHS138*crLHS262;
const double crLHS864 = -crLHS362*crLHS539 + crLHS773*kappa + crLHS774*kappa + crLHS775*kappa + crLHS823;
const double crLHS865 = crLHS156*crLHS243;
const double crLHS866 = crLHS156*crLHS255;
const double crLHS867 = crLHS156*crLHS262;
const double crLHS868 = -crLHS392*crLHS539 + crLHS785*kappa + crLHS786*kappa + crLHS787*kappa + crLHS827;
const double crLHS869 = r_DN(3,0)*r_DN(3,0);
const double crLHS870 = r_DN(3,1)*r_DN(3,1);
const double crLHS871 = r_DN(3,2)*r_DN(3,2);
const double crLHS872 = r_N[3]*r_N[3];
const double crLHS873 = crLHS6*crLHS872;
const double crLHS874 = r_DN(3,0)*r_DN(4,0);
const double crLHS875 = r_DN(3,1)*r_DN(4,1);
const double crLHS876 = r_DN(3,2)*r_DN(4,2);
const double crLHS877 = crLHS11*(crLHS874 + crLHS875 + crLHS876);
const double crLHS878 = r_DN(4,0)*r_N[3];
const double crLHS879 = crLHS272*r_N[4];
const double crLHS880 = -crLHS12*crLHS879;
const double crLHS881 = r_DN(4,1)*r_N[3];
const double crLHS882 = -crLHS23*crLHS879;
const double crLHS883 = r_DN(4,2)*r_N[3];
const double crLHS884 = -crLHS24*crLHS879;
const double crLHS885 = crLHS27*crLHS76;
const double crLHS886 = -crLHS102*crLHS885;
const double crLHS887 = r_DN(3,0)*r_DN(5,0);
const double crLHS888 = r_DN(3,1)*r_DN(5,1);
const double crLHS889 = r_DN(3,2)*r_DN(5,2);
const double crLHS890 = crLHS11*(crLHS887 + crLHS888 + crLHS889);
const double crLHS891 = r_DN(5,0)*r_N[3];
const double crLHS892 = crLHS272*r_N[5];
const double crLHS893 = -crLHS12*crLHS892;
const double crLHS894 = r_DN(5,1)*r_N[3];
const double crLHS895 = -crLHS23*crLHS892;
const double crLHS896 = r_DN(5,2)*r_N[3];
const double crLHS897 = -crLHS24*crLHS892;
const double crLHS898 = -crLHS120*crLHS885;
const double crLHS899 = r_DN(3,0)*r_DN(6,0);
const double crLHS900 = r_DN(3,1)*r_DN(6,1);
const double crLHS901 = r_DN(3,2)*r_DN(6,2);
const double crLHS902 = crLHS11*(crLHS899 + crLHS900 + crLHS901);
const double crLHS903 = r_DN(6,0)*r_N[3];
const double crLHS904 = crLHS272*r_N[6];
const double crLHS905 = -crLHS12*crLHS904;
const double crLHS906 = r_DN(6,1)*r_N[3];
const double crLHS907 = -crLHS23*crLHS904;
const double crLHS908 = r_DN(6,2)*r_N[3];
const double crLHS909 = -crLHS24*crLHS904;
const double crLHS910 = -crLHS138*crLHS885;
const double crLHS911 = r_DN(3,0)*r_DN(7,0);
const double crLHS912 = r_DN(3,1)*r_DN(7,1);
const double crLHS913 = r_DN(3,2)*r_DN(7,2);
const double crLHS914 = crLHS11*(crLHS911 + crLHS912 + crLHS913);
const double crLHS915 = r_DN(7,0)*r_N[3];
const double crLHS916 = crLHS272*r_N[7];
const double crLHS917 = -crLHS12*crLHS916;
const double crLHS918 = r_DN(7,1)*r_N[3];
const double crLHS919 = -crLHS23*crLHS916;
const double crLHS920 = r_DN(7,2)*r_N[3];
const double crLHS921 = -crLHS24*crLHS916;
const double crLHS922 = -crLHS156*crLHS885;
const double crLHS923 = crLHS75*tau_u;
const double crLHS924 = crLHS172*r_DN(3,0);
const double crLHS925 = crLHS275*crLHS7;
const double crLHS926 = crLHS77*crLHS9;
const double crLHS927 = crLHS159*crLHS925;
const double crLHS928 = crLHS160*r_N[3];
const double crLHS929 = crLHS27*crLHS928;
const double crLHS930 = crLHS20*crLHS925 - crLHS22*crLHS75 + crLHS22*crLHS926 + crLHS22*crLHS927 - crLHS22*crLHS929 + crLHS277;
const double crLHS931 = crLHS203*r_DN(3,0);
const double crLHS932 = crLHS39*crLHS925 - crLHS41*crLHS75 + crLHS41*crLHS926 + crLHS41*crLHS927 - crLHS41*crLHS929 + crLHS668;
const double crLHS933 = crLHS59*crLHS925 - crLHS61*crLHS75 + crLHS61*crLHS926 + crLHS61*crLHS927 - crLHS61*crLHS929 + crLHS812;
const double crLHS934 = gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[3]*tau_u - crLHS162*crLHS928 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*tau_u - crLHS923 - r_N[3]);
const double crLHS935 = crLHS25*crLHS873;
const double crLHS936 = crLHS7*crLHS935 - crLHS75*crLHS79 + crLHS77*crLHS925 + crLHS79*crLHS926 + crLHS79*crLHS927 - crLHS79*crLHS929 + crLHS872*sigma;
const double crLHS937 = r_DN(3,0)*r_N[4];
const double crLHS938 = crLHS305*crLHS76;
const double crLHS939 = crLHS7*crLHS938 + crLHS75*r_N[4];
const double crLHS940 = -crLHS75*crLHS97 + crLHS925*crLHS95 + crLHS926*crLHS97 + crLHS927*crLHS97 - crLHS929*crLHS97 + crLHS939;
const double crLHS941 = r_DN(3,0)*r_N[5];
const double crLHS942 = crLHS335*crLHS76;
const double crLHS943 = crLHS7*crLHS942 + crLHS75*r_N[5];
const double crLHS944 = crLHS113*crLHS925 - crLHS115*crLHS75 + crLHS115*crLHS926 + crLHS115*crLHS927 - crLHS115*crLHS929 + crLHS943;
const double crLHS945 = r_DN(3,0)*r_N[6];
const double crLHS946 = crLHS365*crLHS76;
const double crLHS947 = crLHS7*crLHS946 + crLHS75*r_N[6];
const double crLHS948 = crLHS131*crLHS925 - crLHS133*crLHS75 + crLHS133*crLHS926 + crLHS133*crLHS927 - crLHS133*crLHS929 + crLHS947;
const double crLHS949 = r_DN(3,0)*r_N[7];
const double crLHS950 = crLHS394*crLHS76;
const double crLHS951 = crLHS7*crLHS950 + crLHS75*r_N[7];
const double crLHS952 = crLHS149*crLHS925 - crLHS151*crLHS75 + crLHS151*crLHS926 + crLHS151*crLHS927 - crLHS151*crLHS929 + crLHS951;
const double crLHS953 = crLHS172*r_DN(3,1);
const double crLHS954 = crLHS203*r_DN(3,1);
const double crLHS955 = r_DN(3,1)*r_N[4];
const double crLHS956 = r_DN(3,1)*r_N[5];
const double crLHS957 = r_DN(3,1)*r_N[6];
const double crLHS958 = r_DN(3,1)*r_N[7];
const double crLHS959 = crLHS172*r_DN(3,2);
const double crLHS960 = crLHS203*r_DN(3,2);
const double crLHS961 = r_DN(3,2)*r_N[4];
const double crLHS962 = r_DN(3,2)*r_N[5];
const double crLHS963 = r_DN(3,2)*r_N[6];
const double crLHS964 = r_DN(3,2)*r_N[7];
const double crLHS965 = crLHS522*crLHS545;
const double crLHS966 = crLHS524*crLHS77;
const double crLHS967 = crLHS528*crLHS928;
const double crLHS968 = crLHS525*r_N[3];
const double crLHS969 = crLHS46*crLHS873;
const double crLHS970 = crLHS102*crLHS273;
const double crLHS971 = crLHS102*crLHS285;
const double crLHS972 = crLHS102*crLHS292;
const double crLHS973 = -crLHS302*crLHS545 + crLHS874*kappa + crLHS875*kappa + crLHS876*kappa + crLHS938;
const double crLHS974 = crLHS120*crLHS273;
const double crLHS975 = crLHS120*crLHS285;
const double crLHS976 = crLHS120*crLHS292;
const double crLHS977 = -crLHS332*crLHS545 + crLHS887*kappa + crLHS888*kappa + crLHS889*kappa + crLHS942;
const double crLHS978 = crLHS138*crLHS273;
const double crLHS979 = crLHS138*crLHS285;
const double crLHS980 = crLHS138*crLHS292;
const double crLHS981 = -crLHS362*crLHS545 + crLHS899*kappa + crLHS900*kappa + crLHS901*kappa + crLHS946;
const double crLHS982 = crLHS156*crLHS273;
const double crLHS983 = crLHS156*crLHS285;
const double crLHS984 = crLHS156*crLHS292;
const double crLHS985 = -crLHS392*crLHS545 + crLHS911*kappa + crLHS912*kappa + crLHS913*kappa + crLHS950;
const double crLHS986 = r_DN(4,0)*r_DN(4,0);
const double crLHS987 = r_DN(4,1)*r_DN(4,1);
const double crLHS988 = r_DN(4,2)*r_DN(4,2);
const double crLHS989 = r_N[4]*r_N[4];
const double crLHS990 = crLHS6*crLHS989;
const double crLHS991 = r_DN(4,0)*r_DN(5,0);
const double crLHS992 = r_DN(4,1)*r_DN(5,1);
const double crLHS993 = r_DN(4,2)*r_DN(5,2);
const double crLHS994 = crLHS11*(crLHS991 + crLHS992 + crLHS993);
const double crLHS995 = r_DN(5,0)*r_N[4];
const double crLHS996 = crLHS302*r_N[5];
const double crLHS997 = -crLHS12*crLHS996;
const double crLHS998 = r_DN(5,1)*r_N[4];
const double crLHS999 = -crLHS23*crLHS996;
const double crLHS1000 = r_DN(5,2)*r_N[4];
const double crLHS1001 = -crLHS24*crLHS996;
const double crLHS1002 = crLHS27*crLHS94;
const double crLHS1003 = -crLHS1002*crLHS120;
const double crLHS1004 = r_DN(4,0)*r_DN(6,0);
const double crLHS1005 = r_DN(4,1)*r_DN(6,1);
const double crLHS1006 = r_DN(4,2)*r_DN(6,2);
const double crLHS1007 = crLHS11*(crLHS1004 + crLHS1005 + crLHS1006);
const double crLHS1008 = r_DN(6,0)*r_N[4];
const double crLHS1009 = crLHS302*r_N[6];
const double crLHS1010 = -crLHS1009*crLHS12;
const double crLHS1011 = r_DN(6,1)*r_N[4];
const double crLHS1012 = -crLHS1009*crLHS23;
const double crLHS1013 = r_DN(6,2)*r_N[4];
const double crLHS1014 = -crLHS1009*crLHS24;
const double crLHS1015 = -crLHS1002*crLHS138;
const double crLHS1016 = r_DN(4,0)*r_DN(7,0);
const double crLHS1017 = r_DN(4,1)*r_DN(7,1);
const double crLHS1018 = r_DN(4,2)*r_DN(7,2);
const double crLHS1019 = crLHS11*(crLHS1016 + crLHS1017 + crLHS1018);
const double crLHS1020 = r_DN(7,0)*r_N[4];
const double crLHS1021 = crLHS302*r_N[7];
const double crLHS1022 = -crLHS1021*crLHS12;
const double crLHS1023 = r_DN(7,1)*r_N[4];
const double crLHS1024 = -crLHS1021*crLHS23;
const double crLHS1025 = r_DN(7,2)*r_N[4];
const double crLHS1026 = -crLHS1021*crLHS24;
const double crLHS1027 = -crLHS1002*crLHS156;
const double crLHS1028 = crLHS93*tau_u;
const double crLHS1029 = crLHS172*r_DN(4,0);
const double crLHS1030 = crLHS305*crLHS7;
const double crLHS1031 = crLHS9*crLHS95;
const double crLHS1032 = crLHS1030*crLHS159;
const double crLHS1033 = crLHS160*r_N[4];
const double crLHS1034 = crLHS1033*crLHS27;
const double crLHS1035 = crLHS1030*crLHS20 + crLHS1031*crLHS22 + crLHS1032*crLHS22 - crLHS1034*crLHS22 - crLHS22*crLHS93 + crLHS307;
const double crLHS1036 = crLHS203*r_DN(4,0);
const double crLHS1037 = crLHS1030*crLHS39 + crLHS1031*crLHS41 + crLHS1032*crLHS41 - crLHS1034*crLHS41 - crLHS41*crLHS93 + crLHS672;
const double crLHS1038 = crLHS1030*crLHS59 + crLHS1031*crLHS61 + crLHS1032*crLHS61 - crLHS1034*crLHS61 - crLHS61*crLHS93 + crLHS816;
const double crLHS1039 = crLHS1030*crLHS77 + crLHS1031*crLHS79 + crLHS1032*crLHS79 - crLHS1034*crLHS79 - crLHS79*crLHS93 + crLHS939;
const double crLHS1040 = gauss_weight*(-crLHS1028 - crLHS1033*crLHS162 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*tau_u - r_N[4]);
const double crLHS1041 = crLHS25*crLHS990;
const double crLHS1042 = crLHS1030*crLHS95 + crLHS1031*crLHS97 + crLHS1032*crLHS97 - crLHS1034*crLHS97 + crLHS1041*crLHS7 - crLHS93*crLHS97 + crLHS989*sigma;
const double crLHS1043 = r_DN(4,0)*r_N[5];
const double crLHS1044 = crLHS335*crLHS94;
const double crLHS1045 = crLHS1044*crLHS7 + crLHS93*r_N[5];
const double crLHS1046 = crLHS1030*crLHS113 + crLHS1031*crLHS115 + crLHS1032*crLHS115 - crLHS1034*crLHS115 + crLHS1045 - crLHS115*crLHS93;
const double crLHS1047 = r_DN(4,0)*r_N[6];
const double crLHS1048 = crLHS365*crLHS94;
const double crLHS1049 = crLHS1048*crLHS7 + crLHS93*r_N[6];
const double crLHS1050 = crLHS1030*crLHS131 + crLHS1031*crLHS133 + crLHS1032*crLHS133 - crLHS1034*crLHS133 + crLHS1049 - crLHS133*crLHS93;
const double crLHS1051 = r_DN(4,0)*r_N[7];
const double crLHS1052 = crLHS394*crLHS94;
const double crLHS1053 = crLHS1052*crLHS7 + crLHS93*r_N[7];
const double crLHS1054 = crLHS1030*crLHS149 + crLHS1031*crLHS151 + crLHS1032*crLHS151 - crLHS1034*crLHS151 + crLHS1053 - crLHS151*crLHS93;
const double crLHS1055 = crLHS172*r_DN(4,1);
const double crLHS1056 = crLHS203*r_DN(4,1);
const double crLHS1057 = r_DN(4,1)*r_N[5];
const double crLHS1058 = r_DN(4,1)*r_N[6];
const double crLHS1059 = r_DN(4,1)*r_N[7];
const double crLHS1060 = crLHS172*r_DN(4,2);
const double crLHS1061 = crLHS203*r_DN(4,2);
const double crLHS1062 = r_DN(4,2)*r_N[5];
const double crLHS1063 = r_DN(4,2)*r_N[6];
const double crLHS1064 = r_DN(4,2)*r_N[7];
const double crLHS1065 = crLHS522*crLHS551;
const double crLHS1066 = crLHS524*crLHS95;
const double crLHS1067 = crLHS1033*crLHS528;
const double crLHS1068 = crLHS525*r_N[4];
const double crLHS1069 = crLHS46*crLHS990;
const double crLHS1070 = crLHS120*crLHS303;
const double crLHS1071 = crLHS120*crLHS315;
const double crLHS1072 = crLHS120*crLHS322;
const double crLHS1073 = crLHS1044 - crLHS332*crLHS551 + crLHS991*kappa + crLHS992*kappa + crLHS993*kappa;
const double crLHS1074 = crLHS138*crLHS303;
const double crLHS1075 = crLHS138*crLHS315;
const double crLHS1076 = crLHS138*crLHS322;
const double crLHS1077 = crLHS1004*kappa + crLHS1005*kappa + crLHS1006*kappa + crLHS1048 - crLHS362*crLHS551;
const double crLHS1078 = crLHS156*crLHS303;
const double crLHS1079 = crLHS156*crLHS315;
const double crLHS1080 = crLHS156*crLHS322;
const double crLHS1081 = crLHS1016*kappa + crLHS1017*kappa + crLHS1018*kappa + crLHS1052 - crLHS392*crLHS551;
const double crLHS1082 = r_DN(5,0)*r_DN(5,0);
const double crLHS1083 = r_DN(5,1)*r_DN(5,1);
const double crLHS1084 = r_DN(5,2)*r_DN(5,2);
const double crLHS1085 = r_N[5]*r_N[5];
const double crLHS1086 = crLHS1085*crLHS6;
const double crLHS1087 = r_DN(5,0)*r_DN(6,0);
const double crLHS1088 = r_DN(5,1)*r_DN(6,1);
const double crLHS1089 = r_DN(5,2)*r_DN(6,2);
const double crLHS1090 = crLHS11*(crLHS1087 + crLHS1088 + crLHS1089);
const double crLHS1091 = r_DN(6,0)*r_N[5];
const double crLHS1092 = crLHS332*r_N[6];
const double crLHS1093 = -crLHS1092*crLHS12;
const double crLHS1094 = r_DN(6,1)*r_N[5];
const double crLHS1095 = -crLHS1092*crLHS23;
const double crLHS1096 = r_DN(6,2)*r_N[5];
const double crLHS1097 = -crLHS1092*crLHS24;
const double crLHS1098 = crLHS112*crLHS27;
const double crLHS1099 = -crLHS1098*crLHS138;
const double crLHS1100 = r_DN(5,0)*r_DN(7,0);
const double crLHS1101 = r_DN(5,1)*r_DN(7,1);
const double crLHS1102 = r_DN(5,2)*r_DN(7,2);
const double crLHS1103 = crLHS11*(crLHS1100 + crLHS1101 + crLHS1102);
const double crLHS1104 = r_DN(7,0)*r_N[5];
const double crLHS1105 = crLHS332*r_N[7];
const double crLHS1106 = -crLHS1105*crLHS12;
const double crLHS1107 = r_DN(7,1)*r_N[5];
const double crLHS1108 = -crLHS1105*crLHS23;
const double crLHS1109 = r_DN(7,2)*r_N[5];
const double crLHS1110 = -crLHS1105*crLHS24;
const double crLHS1111 = -crLHS1098*crLHS156;
const double crLHS1112 = crLHS111*tau_u;
const double crLHS1113 = crLHS172*r_DN(5,0);
const double crLHS1114 = crLHS335*crLHS7;
const double crLHS1115 = crLHS113*crLHS9;
const double crLHS1116 = crLHS1114*crLHS159;
const double crLHS1117 = crLHS160*r_N[5];
const double crLHS1118 = crLHS1117*crLHS27;
const double crLHS1119 = -crLHS111*crLHS22 + crLHS1114*crLHS20 + crLHS1115*crLHS22 + crLHS1116*crLHS22 - crLHS1118*crLHS22 + crLHS337;
const double crLHS1120 = crLHS203*r_DN(5,0);
const double crLHS1121 = -crLHS111*crLHS41 + crLHS1114*crLHS39 + crLHS1115*crLHS41 + crLHS1116*crLHS41 - crLHS1118*crLHS41 + crLHS676;
const double crLHS1122 = -crLHS111*crLHS61 + crLHS1114*crLHS59 + crLHS1115*crLHS61 + crLHS1116*crLHS61 - crLHS1118*crLHS61 + crLHS820;
const double crLHS1123 = -crLHS111*crLHS79 + crLHS1114*crLHS77 + crLHS1115*crLHS79 + crLHS1116*crLHS79 - crLHS1118*crLHS79 + crLHS943;
const double crLHS1124 = crLHS1045 - crLHS111*crLHS97 + crLHS1114*crLHS95 + crLHS1115*crLHS97 + crLHS1116*crLHS97 - crLHS1118*crLHS97;
const double crLHS1125 = gauss_weight*(-crLHS1112 - crLHS1117*crLHS162 + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[5]*tau_u - r_N[5]);
const double crLHS1126 = crLHS1086*crLHS25;
const double crLHS1127 = crLHS1085*sigma - crLHS111*crLHS115 + crLHS1114*crLHS113 + crLHS1115*crLHS115 + crLHS1116*crLHS115 - crLHS1118*crLHS115 + crLHS1126*crLHS7;
const double crLHS1128 = r_DN(5,0)*r_N[6];
const double crLHS1129 = crLHS112*crLHS365;
const double crLHS1130 = crLHS111*r_N[6] + crLHS1129*crLHS7;
const double crLHS1131 = -crLHS111*crLHS133 + crLHS1114*crLHS131 + crLHS1115*crLHS133 + crLHS1116*crLHS133 - crLHS1118*crLHS133 + crLHS1130;
const double crLHS1132 = r_DN(5,0)*r_N[7];
const double crLHS1133 = crLHS112*crLHS394;
const double crLHS1134 = crLHS111*r_N[7] + crLHS1133*crLHS7;
const double crLHS1135 = -crLHS111*crLHS151 + crLHS1114*crLHS149 + crLHS1115*crLHS151 + crLHS1116*crLHS151 - crLHS1118*crLHS151 + crLHS1134;
const double crLHS1136 = crLHS172*r_DN(5,1);
const double crLHS1137 = crLHS203*r_DN(5,1);
const double crLHS1138 = r_DN(5,1)*r_N[6];
const double crLHS1139 = r_DN(5,1)*r_N[7];
const double crLHS1140 = crLHS172*r_DN(5,2);
const double crLHS1141 = crLHS203*r_DN(5,2);
const double crLHS1142 = r_DN(5,2)*r_N[6];
const double crLHS1143 = r_DN(5,2)*r_N[7];
const double crLHS1144 = crLHS522*crLHS557;
const double crLHS1145 = crLHS113*crLHS524;
const double crLHS1146 = crLHS1117*crLHS528;
const double crLHS1147 = crLHS525*r_N[5];
const double crLHS1148 = crLHS1086*crLHS46;
const double crLHS1149 = crLHS138*crLHS333;
const double crLHS1150 = crLHS138*crLHS345;
const double crLHS1151 = crLHS138*crLHS352;
const double crLHS1152 = crLHS1087*kappa + crLHS1088*kappa + crLHS1089*kappa + crLHS1129 - crLHS362*crLHS557;
const double crLHS1153 = crLHS156*crLHS333;
const double crLHS1154 = crLHS156*crLHS345;
const double crLHS1155 = crLHS156*crLHS352;
const double crLHS1156 = crLHS1100*kappa + crLHS1101*kappa + crLHS1102*kappa + crLHS1133 - crLHS392*crLHS557;
const double crLHS1157 = r_DN(6,0)*r_DN(6,0);
const double crLHS1158 = r_DN(6,1)*r_DN(6,1);
const double crLHS1159 = r_DN(6,2)*r_DN(6,2);
const double crLHS1160 = r_N[6]*r_N[6];
const double crLHS1161 = crLHS1160*crLHS6;
const double crLHS1162 = r_DN(6,0)*r_DN(7,0);
const double crLHS1163 = r_DN(6,1)*r_DN(7,1);
const double crLHS1164 = r_DN(6,2)*r_DN(7,2);
const double crLHS1165 = crLHS11*(crLHS1162 + crLHS1163 + crLHS1164);
const double crLHS1166 = r_DN(7,0)*r_N[6];
const double crLHS1167 = crLHS362*r_N[7];
const double crLHS1168 = -crLHS1167*crLHS12;
const double crLHS1169 = r_DN(7,1)*r_N[6];
const double crLHS1170 = -crLHS1167*crLHS23;
const double crLHS1171 = r_DN(7,2)*r_N[6];
const double crLHS1172 = -crLHS1167*crLHS24;
const double crLHS1173 = -crLHS130*crLHS156*crLHS27;
const double crLHS1174 = crLHS129*tau_u;
const double crLHS1175 = crLHS172*r_DN(6,0);
const double crLHS1176 = crLHS365*crLHS7;
const double crLHS1177 = crLHS131*crLHS9;
const double crLHS1178 = crLHS1176*crLHS159;
const double crLHS1179 = crLHS160*r_N[6];
const double crLHS1180 = crLHS1179*crLHS27;
const double crLHS1181 = crLHS1176*crLHS20 + crLHS1177*crLHS22 + crLHS1178*crLHS22 - crLHS1180*crLHS22 - crLHS129*crLHS22 + crLHS367;
const double crLHS1182 = crLHS203*r_DN(6,0);
const double crLHS1183 = crLHS1176*crLHS39 + crLHS1177*crLHS41 + crLHS1178*crLHS41 - crLHS1180*crLHS41 - crLHS129*crLHS41 + crLHS680;
const double crLHS1184 = crLHS1176*crLHS59 + crLHS1177*crLHS61 + crLHS1178*crLHS61 - crLHS1180*crLHS61 - crLHS129*crLHS61 + crLHS824;
const double crLHS1185 = crLHS1176*crLHS77 + crLHS1177*crLHS79 + crLHS1178*crLHS79 - crLHS1180*crLHS79 - crLHS129*crLHS79 + crLHS947;
const double crLHS1186 = crLHS1049 + crLHS1176*crLHS95 + crLHS1177*crLHS97 + crLHS1178*crLHS97 - crLHS1180*crLHS97 - crLHS129*crLHS97;
const double crLHS1187 = crLHS113*crLHS1176 + crLHS1130 + crLHS115*crLHS1177 + crLHS115*crLHS1178 - crLHS115*crLHS1180 - crLHS115*crLHS129;
const double crLHS1188 = gauss_weight*(-crLHS1174 - crLHS1179*crLHS162 + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[6]*tau_u - r_N[6]);
const double crLHS1189 = crLHS1161*crLHS25;
const double crLHS1190 = crLHS1160*sigma + crLHS1176*crLHS131 + crLHS1177*crLHS133 + crLHS1178*crLHS133 - crLHS1180*crLHS133 + crLHS1189*crLHS7 - crLHS129*crLHS133;
const double crLHS1191 = r_DN(6,0)*r_N[7];
const double crLHS1192 = crLHS130*crLHS394;
const double crLHS1193 = crLHS1192*crLHS7 + crLHS129*r_N[7];
const double crLHS1194 = crLHS1176*crLHS149 + crLHS1177*crLHS151 + crLHS1178*crLHS151 - crLHS1180*crLHS151 + crLHS1193 - crLHS129*crLHS151;
const double crLHS1195 = crLHS172*r_DN(6,1);
const double crLHS1196 = crLHS203*r_DN(6,1);
const double crLHS1197 = r_DN(6,1)*r_N[7];
const double crLHS1198 = crLHS172*r_DN(6,2);
const double crLHS1199 = crLHS203*r_DN(6,2);
const double crLHS1200 = r_DN(6,2)*r_N[7];
const double crLHS1201 = crLHS522*crLHS563;
const double crLHS1202 = crLHS131*crLHS524;
const double crLHS1203 = crLHS1179*crLHS528;
const double crLHS1204 = crLHS525*r_N[6];
const double crLHS1205 = crLHS1161*crLHS46;
const double crLHS1206 = crLHS156*crLHS363;
const double crLHS1207 = crLHS156*crLHS375;
const double crLHS1208 = crLHS156*crLHS382;
const double crLHS1209 = crLHS1162*kappa + crLHS1163*kappa + crLHS1164*kappa + crLHS1192 - crLHS392*crLHS563;
const double crLHS1210 = r_DN(7,0)*r_DN(7,0);
const double crLHS1211 = r_DN(7,1)*r_DN(7,1);
const double crLHS1212 = r_DN(7,2)*r_DN(7,2);
const double crLHS1213 = r_N[7]*r_N[7];
const double crLHS1214 = crLHS1213*crLHS6;
const double crLHS1215 = crLHS147*tau_u;
const double crLHS1216 = crLHS172*r_DN(7,0);
const double crLHS1217 = crLHS394*crLHS7;
const double crLHS1218 = crLHS149*crLHS9;
const double crLHS1219 = crLHS1217*crLHS159;
const double crLHS1220 = crLHS160*r_N[7];
const double crLHS1221 = crLHS1220*crLHS27;
const double crLHS1222 = crLHS1217*crLHS20 + crLHS1218*crLHS22 + crLHS1219*crLHS22 - crLHS1221*crLHS22 - crLHS147*crLHS22 + crLHS396;
const double crLHS1223 = crLHS203*r_DN(7,0);
const double crLHS1224 = crLHS1217*crLHS39 + crLHS1218*crLHS41 + crLHS1219*crLHS41 - crLHS1221*crLHS41 - crLHS147*crLHS41 + crLHS684;
const double crLHS1225 = crLHS1217*crLHS59 + crLHS1218*crLHS61 + crLHS1219*crLHS61 - crLHS1221*crLHS61 - crLHS147*crLHS61 + crLHS828;
const double crLHS1226 = crLHS1217*crLHS77 + crLHS1218*crLHS79 + crLHS1219*crLHS79 - crLHS1221*crLHS79 - crLHS147*crLHS79 + crLHS951;
const double crLHS1227 = crLHS1053 + crLHS1217*crLHS95 + crLHS1218*crLHS97 + crLHS1219*crLHS97 - crLHS1221*crLHS97 - crLHS147*crLHS97;
const double crLHS1228 = crLHS113*crLHS1217 + crLHS1134 + crLHS115*crLHS1218 + crLHS115*crLHS1219 - crLHS115*crLHS1221 - crLHS115*crLHS147;
const double crLHS1229 = crLHS1193 + crLHS1217*crLHS131 + crLHS1218*crLHS133 + crLHS1219*crLHS133 - crLHS1221*crLHS133 - crLHS133*crLHS147;
const double crLHS1230 = gauss_weight*(-crLHS1215 - crLHS1220*crLHS162 + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_N[7]*tau_u - r_N[7]);
const double crLHS1231 = crLHS1214*crLHS25;
const double crLHS1232 = crLHS1213*sigma + crLHS1217*crLHS149 + crLHS1218*crLHS151 + crLHS1219*crLHS151 - crLHS1221*crLHS151 + crLHS1231*crLHS7 - crLHS147*crLHS151;
const double crLHS1233 = crLHS172*r_DN(7,1);
const double crLHS1234 = crLHS203*r_DN(7,1);
const double crLHS1235 = crLHS172*r_DN(7,2);
const double crLHS1236 = crLHS203*r_DN(7,2);
const double crLHS1237 = crLHS522*crLHS569;
const double crLHS1238 = crLHS149*crLHS524;
const double crLHS1239 = crLHS1220*crLHS528;
const double crLHS1240 = crLHS525*r_N[7];
const double crLHS1241 = crLHS1214*crLHS46;
rLHS(0,0)+=crLHS11*(crLHS0 + crLHS1 + crLHS2);
rLHS(0,1)+=crLHS10*(-crLHS12*crLHS14 + crLHS22*r_DN(0,0) + r_DN(0,0)*r_N[0]);
rLHS(0,2)+=crLHS10*(-crLHS14*crLHS23 + crLHS22*r_DN(0,1) + r_DN(0,1)*r_N[0]);
rLHS(0,3)+=crLHS10*(-crLHS14*crLHS24 + crLHS22*r_DN(0,2) + r_DN(0,2)*r_N[0]);
rLHS(0,4)+=-crLHS13*crLHS28;
rLHS(0,5)+=crLHS32;
rLHS(0,6)+=crLHS10*(crLHS33 + crLHS36 + crLHS41*r_DN(0,0));
rLHS(0,7)+=crLHS10*(crLHS41*r_DN(0,1) + crLHS42 + crLHS43);
rLHS(0,8)+=crLHS10*(crLHS41*r_DN(0,2) + crLHS44 + crLHS45);
rLHS(0,9)+=crLHS49;
rLHS(0,10)+=crLHS53;
rLHS(0,11)+=crLHS10*(crLHS54 + crLHS56 + crLHS61*r_DN(0,0));
rLHS(0,12)+=crLHS10*(crLHS61*r_DN(0,1) + crLHS62 + crLHS63);
rLHS(0,13)+=crLHS10*(crLHS61*r_DN(0,2) + crLHS64 + crLHS65);
rLHS(0,14)+=crLHS67;
rLHS(0,15)+=crLHS71;
rLHS(0,16)+=crLHS10*(crLHS72 + crLHS74 + crLHS79*r_DN(0,0));
rLHS(0,17)+=crLHS10*(crLHS79*r_DN(0,1) + crLHS80 + crLHS81);
rLHS(0,18)+=crLHS10*(crLHS79*r_DN(0,2) + crLHS82 + crLHS83);
rLHS(0,19)+=crLHS85;
rLHS(0,20)+=crLHS89;
rLHS(0,21)+=crLHS10*(crLHS90 + crLHS92 + crLHS97*r_DN(0,0));
rLHS(0,22)+=crLHS10*(crLHS97*r_DN(0,1) + crLHS98 + crLHS99);
rLHS(0,23)+=crLHS10*(crLHS100 + crLHS101 + crLHS97*r_DN(0,2));
rLHS(0,24)+=crLHS103;
rLHS(0,25)+=crLHS107;
rLHS(0,26)+=crLHS10*(crLHS108 + crLHS110 + crLHS115*r_DN(0,0));
rLHS(0,27)+=crLHS10*(crLHS115*r_DN(0,1) + crLHS116 + crLHS117);
rLHS(0,28)+=crLHS10*(crLHS115*r_DN(0,2) + crLHS118 + crLHS119);
rLHS(0,29)+=crLHS121;
rLHS(0,30)+=crLHS125;
rLHS(0,31)+=crLHS10*(crLHS126 + crLHS128 + crLHS133*r_DN(0,0));
rLHS(0,32)+=crLHS10*(crLHS133*r_DN(0,1) + crLHS134 + crLHS135);
rLHS(0,33)+=crLHS10*(crLHS133*r_DN(0,2) + crLHS136 + crLHS137);
rLHS(0,34)+=crLHS139;
rLHS(0,35)+=crLHS143;
rLHS(0,36)+=crLHS10*(crLHS144 + crLHS146 + crLHS151*r_DN(0,0));
rLHS(0,37)+=crLHS10*(crLHS151*r_DN(0,1) + crLHS152 + crLHS153);
rLHS(0,38)+=crLHS10*(crLHS151*r_DN(0,2) + crLHS154 + crLHS155);
rLHS(0,39)+=crLHS157;
rLHS(1,0)+=crLHS163*r_DN(0,0);
rLHS(1,1)+=gauss_weight*(crLHS164*r_DN(0,0) + crLHS166*r_DN(0,1) + crLHS168*r_DN(0,2) + crLHS171*crLHS173 + crLHS180);
rLHS(1,2)+=gauss_weight*(crLHS173*crLHS189 + crLHS181*r_DN(0,0) + crLHS183*r_DN(0,1) + crLHS186*r_DN(0,2));
rLHS(1,3)+=gauss_weight*(crLHS173*crLHS197 + crLHS190*r_DN(0,0) + crLHS192*r_DN(0,1) + crLHS194*r_DN(0,2));
rLHS(1,4)+=-crLHS202*crLHS204;
rLHS(1,5)+=gauss_weight*(-crLHS158*r_DN(1,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u - crLHS205 - crLHS206*crLHS33);
rLHS(1,6)+=gauss_weight*(crLHS173*crLHS214 + crLHS207*r_DN(0,0) + crLHS209*r_DN(0,1) + crLHS211*r_DN(0,2) + crLHS218);
rLHS(1,7)+=gauss_weight*(crLHS173*crLHS226 + crLHS219*r_DN(0,0) + crLHS221*r_DN(0,1) + crLHS224*r_DN(0,2));
rLHS(1,8)+=gauss_weight*(crLHS173*crLHS233 + crLHS227*r_DN(0,0) + crLHS229*r_DN(0,1) + crLHS231*r_DN(0,2));
rLHS(1,9)+=-crLHS204*crLHS235;
rLHS(1,10)+=gauss_weight*(-crLHS158*r_DN(2,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u - crLHS206*crLHS54 - crLHS236);
rLHS(1,11)+=gauss_weight*(crLHS173*crLHS244 + crLHS237*r_DN(0,0) + crLHS239*r_DN(0,1) + crLHS241*r_DN(0,2) + crLHS248);
rLHS(1,12)+=gauss_weight*(crLHS173*crLHS256 + crLHS249*r_DN(0,0) + crLHS251*r_DN(0,1) + crLHS254*r_DN(0,2));
rLHS(1,13)+=gauss_weight*(crLHS173*crLHS263 + crLHS257*r_DN(0,0) + crLHS259*r_DN(0,1) + crLHS261*r_DN(0,2));
rLHS(1,14)+=-crLHS204*crLHS265;
rLHS(1,15)+=gauss_weight*(-crLHS158*r_DN(3,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u - crLHS206*crLHS72 - crLHS266);
rLHS(1,16)+=gauss_weight*(crLHS173*crLHS274 + crLHS267*r_DN(0,0) + crLHS269*r_DN(0,1) + crLHS271*r_DN(0,2) + crLHS278);
rLHS(1,17)+=gauss_weight*(crLHS173*crLHS286 + crLHS279*r_DN(0,0) + crLHS281*r_DN(0,1) + crLHS284*r_DN(0,2));
rLHS(1,18)+=gauss_weight*(crLHS173*crLHS293 + crLHS287*r_DN(0,0) + crLHS289*r_DN(0,1) + crLHS291*r_DN(0,2));
rLHS(1,19)+=-crLHS204*crLHS295;
rLHS(1,20)+=gauss_weight*(-crLHS158*r_DN(4,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u - crLHS206*crLHS90 - crLHS296);
rLHS(1,21)+=gauss_weight*(crLHS173*crLHS304 + crLHS297*r_DN(0,0) + crLHS299*r_DN(0,1) + crLHS301*r_DN(0,2) + crLHS308);
rLHS(1,22)+=gauss_weight*(crLHS173*crLHS316 + crLHS309*r_DN(0,0) + crLHS311*r_DN(0,1) + crLHS314*r_DN(0,2));
rLHS(1,23)+=gauss_weight*(crLHS173*crLHS323 + crLHS317*r_DN(0,0) + crLHS319*r_DN(0,1) + crLHS321*r_DN(0,2));
rLHS(1,24)+=-crLHS204*crLHS325;
rLHS(1,25)+=gauss_weight*(-crLHS108*crLHS206 - crLHS158*r_DN(5,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*tau_u - crLHS326);
rLHS(1,26)+=gauss_weight*(crLHS173*crLHS334 + crLHS327*r_DN(0,0) + crLHS329*r_DN(0,1) + crLHS331*r_DN(0,2) + crLHS338);
rLHS(1,27)+=gauss_weight*(crLHS173*crLHS346 + crLHS339*r_DN(0,0) + crLHS341*r_DN(0,1) + crLHS344*r_DN(0,2));
rLHS(1,28)+=gauss_weight*(crLHS173*crLHS353 + crLHS347*r_DN(0,0) + crLHS349*r_DN(0,1) + crLHS351*r_DN(0,2));
rLHS(1,29)+=-crLHS204*crLHS355;
rLHS(1,30)+=gauss_weight*(-crLHS126*crLHS206 - crLHS158*r_DN(6,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*tau_u - crLHS356);
rLHS(1,31)+=gauss_weight*(crLHS173*crLHS364 + crLHS357*r_DN(0,0) + crLHS359*r_DN(0,1) + crLHS361*r_DN(0,2) + crLHS368);
rLHS(1,32)+=gauss_weight*(crLHS173*crLHS376 + crLHS369*r_DN(0,0) + crLHS371*r_DN(0,1) + crLHS374*r_DN(0,2));
rLHS(1,33)+=gauss_weight*(crLHS173*crLHS383 + crLHS377*r_DN(0,0) + crLHS379*r_DN(0,1) + crLHS381*r_DN(0,2));
rLHS(1,34)+=-crLHS204*crLHS385;
rLHS(1,35)+=gauss_weight*(-crLHS144*crLHS206 - crLHS158*r_DN(7,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*tau_u - crLHS386);
rLHS(1,36)+=gauss_weight*(crLHS173*crLHS393 + crLHS387*r_DN(0,0) + crLHS389*r_DN(0,1) + crLHS391*r_DN(0,2) + crLHS397);
rLHS(1,37)+=gauss_weight*(crLHS173*crLHS404 + crLHS398*r_DN(0,0) + crLHS400*r_DN(0,1) + crLHS403*r_DN(0,2));
rLHS(1,38)+=gauss_weight*(crLHS173*crLHS410 + crLHS405*r_DN(0,0) + crLHS407*r_DN(0,1) + crLHS409*r_DN(0,2));
rLHS(1,39)+=-crLHS204*crLHS412;
rLHS(2,0)+=crLHS163*r_DN(0,1);
rLHS(2,1)+=gauss_weight*(crLHS166*r_DN(0,0) + crLHS171*crLHS415 + crLHS413*r_DN(0,1) + crLHS414*r_DN(0,2));
rLHS(2,2)+=gauss_weight*(crLHS180 + crLHS183*r_DN(0,0) + crLHS189*crLHS415 + crLHS416*r_DN(0,1) + crLHS418*r_DN(0,2));
rLHS(2,3)+=gauss_weight*(crLHS192*r_DN(0,0) + crLHS197*crLHS415 + crLHS419*r_DN(0,1) + crLHS421*r_DN(0,2));
rLHS(2,4)+=-crLHS202*crLHS422;
rLHS(2,5)+=gauss_weight*(-crLHS158*r_DN(1,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u - crLHS206*crLHS42 - crLHS423);
rLHS(2,6)+=gauss_weight*(crLHS209*r_DN(0,0) + crLHS214*crLHS415 + crLHS424*r_DN(0,1) + crLHS425*r_DN(0,2));
rLHS(2,7)+=gauss_weight*(crLHS218 + crLHS221*r_DN(0,0) + crLHS226*crLHS415 + crLHS426*r_DN(0,1) + crLHS428*r_DN(0,2));
rLHS(2,8)+=gauss_weight*(crLHS229*r_DN(0,0) + crLHS233*crLHS415 + crLHS429*r_DN(0,1) + crLHS431*r_DN(0,2));
rLHS(2,9)+=-crLHS235*crLHS422;
rLHS(2,10)+=gauss_weight*(-crLHS158*r_DN(2,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u - crLHS206*crLHS62 - crLHS432);
rLHS(2,11)+=gauss_weight*(crLHS239*r_DN(0,0) + crLHS244*crLHS415 + crLHS433*r_DN(0,1) + crLHS434*r_DN(0,2));
rLHS(2,12)+=gauss_weight*(crLHS248 + crLHS251*r_DN(0,0) + crLHS256*crLHS415 + crLHS435*r_DN(0,1) + crLHS437*r_DN(0,2));
rLHS(2,13)+=gauss_weight*(crLHS259*r_DN(0,0) + crLHS263*crLHS415 + crLHS438*r_DN(0,1) + crLHS440*r_DN(0,2));
rLHS(2,14)+=-crLHS265*crLHS422;
rLHS(2,15)+=gauss_weight*(-crLHS158*r_DN(3,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u - crLHS206*crLHS80 - crLHS441);
rLHS(2,16)+=gauss_weight*(crLHS269*r_DN(0,0) + crLHS274*crLHS415 + crLHS442*r_DN(0,1) + crLHS443*r_DN(0,2));
rLHS(2,17)+=gauss_weight*(crLHS278 + crLHS281*r_DN(0,0) + crLHS286*crLHS415 + crLHS444*r_DN(0,1) + crLHS446*r_DN(0,2));
rLHS(2,18)+=gauss_weight*(crLHS289*r_DN(0,0) + crLHS293*crLHS415 + crLHS447*r_DN(0,1) + crLHS449*r_DN(0,2));
rLHS(2,19)+=-crLHS295*crLHS422;
rLHS(2,20)+=gauss_weight*(-crLHS158*r_DN(4,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u - crLHS206*crLHS98 - crLHS450);
rLHS(2,21)+=gauss_weight*(crLHS299*r_DN(0,0) + crLHS304*crLHS415 + crLHS451*r_DN(0,1) + crLHS452*r_DN(0,2));
rLHS(2,22)+=gauss_weight*(crLHS308 + crLHS311*r_DN(0,0) + crLHS316*crLHS415 + crLHS453*r_DN(0,1) + crLHS455*r_DN(0,2));
rLHS(2,23)+=gauss_weight*(crLHS319*r_DN(0,0) + crLHS323*crLHS415 + crLHS456*r_DN(0,1) + crLHS458*r_DN(0,2));
rLHS(2,24)+=-crLHS325*crLHS422;
rLHS(2,25)+=gauss_weight*(-crLHS116*crLHS206 - crLHS158*r_DN(5,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*tau_u - crLHS459);
rLHS(2,26)+=gauss_weight*(crLHS329*r_DN(0,0) + crLHS334*crLHS415 + crLHS460*r_DN(0,1) + crLHS461*r_DN(0,2));
rLHS(2,27)+=gauss_weight*(crLHS338 + crLHS341*r_DN(0,0) + crLHS346*crLHS415 + crLHS462*r_DN(0,1) + crLHS464*r_DN(0,2));
rLHS(2,28)+=gauss_weight*(crLHS349*r_DN(0,0) + crLHS353*crLHS415 + crLHS465*r_DN(0,1) + crLHS467*r_DN(0,2));
rLHS(2,29)+=-crLHS355*crLHS422;
rLHS(2,30)+=gauss_weight*(-crLHS134*crLHS206 - crLHS158*r_DN(6,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*tau_u - crLHS468);
rLHS(2,31)+=gauss_weight*(crLHS359*r_DN(0,0) + crLHS364*crLHS415 + crLHS469*r_DN(0,1) + crLHS470*r_DN(0,2));
rLHS(2,32)+=gauss_weight*(crLHS368 + crLHS371*r_DN(0,0) + crLHS376*crLHS415 + crLHS471*r_DN(0,1) + crLHS473*r_DN(0,2));
rLHS(2,33)+=gauss_weight*(crLHS379*r_DN(0,0) + crLHS383*crLHS415 + crLHS474*r_DN(0,1) + crLHS476*r_DN(0,2));
rLHS(2,34)+=-crLHS385*crLHS422;
rLHS(2,35)+=gauss_weight*(-crLHS152*crLHS206 - crLHS158*r_DN(7,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*tau_u - crLHS477);
rLHS(2,36)+=gauss_weight*(crLHS389*r_DN(0,0) + crLHS393*crLHS415 + crLHS478*r_DN(0,1) + crLHS479*r_DN(0,2));
rLHS(2,37)+=gauss_weight*(crLHS397 + crLHS400*r_DN(0,0) + crLHS404*crLHS415 + crLHS480*r_DN(0,1) + crLHS482*r_DN(0,2));
rLHS(2,38)+=gauss_weight*(crLHS407*r_DN(0,0) + crLHS410*crLHS415 + crLHS483*r_DN(0,1) + crLHS485*r_DN(0,2));
rLHS(2,39)+=-crLHS412*crLHS422;
rLHS(3,0)+=crLHS163*r_DN(0,2);
rLHS(3,1)+=gauss_weight*(crLHS168*r_DN(0,0) + crLHS171*crLHS487 + crLHS414*r_DN(0,1) + crLHS486*r_DN(0,2));
rLHS(3,2)+=gauss_weight*(crLHS186*r_DN(0,0) + crLHS189*crLHS487 + crLHS418*r_DN(0,1) + crLHS488*r_DN(0,2));
rLHS(3,3)+=gauss_weight*(crLHS180 + crLHS194*r_DN(0,0) + crLHS197*crLHS487 + crLHS421*r_DN(0,1) + crLHS489*r_DN(0,2));
rLHS(3,4)+=-crLHS202*crLHS490;
rLHS(3,5)+=gauss_weight*(-crLHS158*r_DN(1,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u - crLHS206*crLHS44 - crLHS491);
rLHS(3,6)+=gauss_weight*(crLHS211*r_DN(0,0) + crLHS214*crLHS487 + crLHS425*r_DN(0,1) + crLHS492*r_DN(0,2));
rLHS(3,7)+=gauss_weight*(crLHS224*r_DN(0,0) + crLHS226*crLHS487 + crLHS428*r_DN(0,1) + crLHS493*r_DN(0,2));
rLHS(3,8)+=gauss_weight*(crLHS218 + crLHS231*r_DN(0,0) + crLHS233*crLHS487 + crLHS431*r_DN(0,1) + crLHS494*r_DN(0,2));
rLHS(3,9)+=-crLHS235*crLHS490;
rLHS(3,10)+=gauss_weight*(-crLHS158*r_DN(2,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u - crLHS206*crLHS64 - crLHS495);
rLHS(3,11)+=gauss_weight*(crLHS241*r_DN(0,0) + crLHS244*crLHS487 + crLHS434*r_DN(0,1) + crLHS496*r_DN(0,2));
rLHS(3,12)+=gauss_weight*(crLHS254*r_DN(0,0) + crLHS256*crLHS487 + crLHS437*r_DN(0,1) + crLHS497*r_DN(0,2));
rLHS(3,13)+=gauss_weight*(crLHS248 + crLHS261*r_DN(0,0) + crLHS263*crLHS487 + crLHS440*r_DN(0,1) + crLHS498*r_DN(0,2));
rLHS(3,14)+=-crLHS265*crLHS490;
rLHS(3,15)+=gauss_weight*(-crLHS158*r_DN(3,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u - crLHS206*crLHS82 - crLHS499);
rLHS(3,16)+=gauss_weight*(crLHS271*r_DN(0,0) + crLHS274*crLHS487 + crLHS443*r_DN(0,1) + crLHS500*r_DN(0,2));
rLHS(3,17)+=gauss_weight*(crLHS284*r_DN(0,0) + crLHS286*crLHS487 + crLHS446*r_DN(0,1) + crLHS501*r_DN(0,2));
rLHS(3,18)+=gauss_weight*(crLHS278 + crLHS291*r_DN(0,0) + crLHS293*crLHS487 + crLHS449*r_DN(0,1) + crLHS502*r_DN(0,2));
rLHS(3,19)+=-crLHS295*crLHS490;
rLHS(3,20)+=gauss_weight*(-crLHS100*crLHS206 - crLHS158*r_DN(4,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u - crLHS503);
rLHS(3,21)+=gauss_weight*(crLHS301*r_DN(0,0) + crLHS304*crLHS487 + crLHS452*r_DN(0,1) + crLHS504*r_DN(0,2));
rLHS(3,22)+=gauss_weight*(crLHS314*r_DN(0,0) + crLHS316*crLHS487 + crLHS455*r_DN(0,1) + crLHS505*r_DN(0,2));
rLHS(3,23)+=gauss_weight*(crLHS308 + crLHS321*r_DN(0,0) + crLHS323*crLHS487 + crLHS458*r_DN(0,1) + crLHS506*r_DN(0,2));
rLHS(3,24)+=-crLHS325*crLHS490;
rLHS(3,25)+=gauss_weight*(-crLHS118*crLHS206 - crLHS158*r_DN(5,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*tau_u - crLHS507);
rLHS(3,26)+=gauss_weight*(crLHS331*r_DN(0,0) + crLHS334*crLHS487 + crLHS461*r_DN(0,1) + crLHS508*r_DN(0,2));
rLHS(3,27)+=gauss_weight*(crLHS344*r_DN(0,0) + crLHS346*crLHS487 + crLHS464*r_DN(0,1) + crLHS509*r_DN(0,2));
rLHS(3,28)+=gauss_weight*(crLHS338 + crLHS351*r_DN(0,0) + crLHS353*crLHS487 + crLHS467*r_DN(0,1) + crLHS510*r_DN(0,2));
rLHS(3,29)+=-crLHS355*crLHS490;
rLHS(3,30)+=gauss_weight*(-crLHS136*crLHS206 - crLHS158*r_DN(6,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*tau_u - crLHS511);
rLHS(3,31)+=gauss_weight*(crLHS361*r_DN(0,0) + crLHS364*crLHS487 + crLHS470*r_DN(0,1) + crLHS512*r_DN(0,2));
rLHS(3,32)+=gauss_weight*(crLHS374*r_DN(0,0) + crLHS376*crLHS487 + crLHS473*r_DN(0,1) + crLHS513*r_DN(0,2));
rLHS(3,33)+=gauss_weight*(crLHS368 + crLHS381*r_DN(0,0) + crLHS383*crLHS487 + crLHS476*r_DN(0,1) + crLHS514*r_DN(0,2));
rLHS(3,34)+=-crLHS385*crLHS490;
rLHS(3,35)+=gauss_weight*(-crLHS154*crLHS206 - crLHS158*r_DN(7,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[0]*tau_u + crLHS20*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*tau_u - crLHS515);
rLHS(3,36)+=gauss_weight*(crLHS391*r_DN(0,0) + crLHS393*crLHS487 + crLHS479*r_DN(0,1) + crLHS516*r_DN(0,2));
rLHS(3,37)+=gauss_weight*(crLHS403*r_DN(0,0) + crLHS404*crLHS487 + crLHS482*r_DN(0,1) + crLHS517*r_DN(0,2));
rLHS(3,38)+=gauss_weight*(crLHS397 + crLHS409*r_DN(0,0) + crLHS410*crLHS487 + crLHS485*r_DN(0,1) + crLHS518*r_DN(0,2));
rLHS(3,39)+=-crLHS412*crLHS490;
rLHS(4,0)+=0;
rLHS(4,1)+=crLHS169*crLHS519;
rLHS(4,2)+=crLHS187*crLHS519;
rLHS(4,3)+=crLHS195*crLHS519;
rLHS(4,4)+=gauss_weight*(crLHS0*kappa + crLHS1*kappa - crLHS14*dp_th_dt + crLHS174 + crLHS175*crLHS201 + crLHS2*kappa - crLHS521*crLHS523 - crLHS521*crLHS526 - crLHS521*crLHS527 + crLHS521*crLHS529);
rLHS(4,5)+=0;
rLHS(4,6)+=crLHS530;
rLHS(4,7)+=crLHS531;
rLHS(4,8)+=crLHS532;
rLHS(4,9)+=gauss_weight*(crLHS175*crLHS234 - crLHS523*crLHS534 - crLHS526*crLHS534 - crLHS527*crLHS534 + crLHS529*crLHS534 + crLHS535);
rLHS(4,10)+=0;
rLHS(4,11)+=crLHS536;
rLHS(4,12)+=crLHS537;
rLHS(4,13)+=crLHS538;
rLHS(4,14)+=gauss_weight*(crLHS175*crLHS264 - crLHS523*crLHS540 - crLHS526*crLHS540 - crLHS527*crLHS540 + crLHS529*crLHS540 + crLHS541);
rLHS(4,15)+=0;
rLHS(4,16)+=crLHS542;
rLHS(4,17)+=crLHS543;
rLHS(4,18)+=crLHS544;
rLHS(4,19)+=gauss_weight*(crLHS175*crLHS294 - crLHS523*crLHS546 - crLHS526*crLHS546 - crLHS527*crLHS546 + crLHS529*crLHS546 + crLHS547);
rLHS(4,20)+=0;
rLHS(4,21)+=crLHS548;
rLHS(4,22)+=crLHS549;
rLHS(4,23)+=crLHS550;
rLHS(4,24)+=gauss_weight*(crLHS175*crLHS324 - crLHS523*crLHS552 - crLHS526*crLHS552 - crLHS527*crLHS552 + crLHS529*crLHS552 + crLHS553);
rLHS(4,25)+=0;
rLHS(4,26)+=crLHS554;
rLHS(4,27)+=crLHS555;
rLHS(4,28)+=crLHS556;
rLHS(4,29)+=gauss_weight*(crLHS175*crLHS354 - crLHS523*crLHS558 - crLHS526*crLHS558 - crLHS527*crLHS558 + crLHS529*crLHS558 + crLHS559);
rLHS(4,30)+=0;
rLHS(4,31)+=crLHS560;
rLHS(4,32)+=crLHS561;
rLHS(4,33)+=crLHS562;
rLHS(4,34)+=gauss_weight*(crLHS175*crLHS384 - crLHS523*crLHS564 - crLHS526*crLHS564 - crLHS527*crLHS564 + crLHS529*crLHS564 + crLHS565);
rLHS(4,35)+=0;
rLHS(4,36)+=crLHS566;
rLHS(4,37)+=crLHS567;
rLHS(4,38)+=crLHS568;
rLHS(4,39)+=gauss_weight*(crLHS175*crLHS411 - crLHS523*crLHS570 - crLHS526*crLHS570 - crLHS527*crLHS570 + crLHS529*crLHS570 + crLHS571);
rLHS(5,0)+=crLHS32;
rLHS(5,1)+=crLHS10*(crLHS205 + crLHS22*r_DN(1,0) + crLHS36);
rLHS(5,2)+=crLHS10*(crLHS22*r_DN(1,1) + crLHS423 + crLHS43);
rLHS(5,3)+=crLHS10*(crLHS22*r_DN(1,2) + crLHS45 + crLHS491);
rLHS(5,4)+=crLHS49;
rLHS(5,5)+=crLHS11*(crLHS572 + crLHS573 + crLHS574);
rLHS(5,6)+=crLHS10*(-crLHS12*crLHS576 + crLHS41*r_DN(1,0) + r_DN(1,0)*r_N[1]);
rLHS(5,7)+=crLHS10*(-crLHS23*crLHS576 + crLHS41*r_DN(1,1) + r_DN(1,1)*r_N[1]);
rLHS(5,8)+=crLHS10*(-crLHS24*crLHS576 + crLHS41*r_DN(1,2) + r_DN(1,2)*r_N[1]);
rLHS(5,9)+=-crLHS28*crLHS575;
rLHS(5,10)+=crLHS580;
rLHS(5,11)+=crLHS10*(crLHS581 + crLHS583 + crLHS61*r_DN(1,0));
rLHS(5,12)+=crLHS10*(crLHS584 + crLHS585 + crLHS61*r_DN(1,1));
rLHS(5,13)+=crLHS10*(crLHS586 + crLHS587 + crLHS61*r_DN(1,2));
rLHS(5,14)+=crLHS589;
rLHS(5,15)+=crLHS593;
rLHS(5,16)+=crLHS10*(crLHS594 + crLHS596 + crLHS79*r_DN(1,0));
rLHS(5,17)+=crLHS10*(crLHS597 + crLHS598 + crLHS79*r_DN(1,1));
rLHS(5,18)+=crLHS10*(crLHS599 + crLHS600 + crLHS79*r_DN(1,2));
rLHS(5,19)+=crLHS601;
rLHS(5,20)+=crLHS605;
rLHS(5,21)+=crLHS10*(crLHS606 + crLHS608 + crLHS97*r_DN(1,0));
rLHS(5,22)+=crLHS10*(crLHS609 + crLHS610 + crLHS97*r_DN(1,1));
rLHS(5,23)+=crLHS10*(crLHS611 + crLHS612 + crLHS97*r_DN(1,2));
rLHS(5,24)+=crLHS613;
rLHS(5,25)+=crLHS617;
rLHS(5,26)+=crLHS10*(crLHS115*r_DN(1,0) + crLHS618 + crLHS620);
rLHS(5,27)+=crLHS10*(crLHS115*r_DN(1,1) + crLHS621 + crLHS622);
rLHS(5,28)+=crLHS10*(crLHS115*r_DN(1,2) + crLHS623 + crLHS624);
rLHS(5,29)+=crLHS625;
rLHS(5,30)+=crLHS629;
rLHS(5,31)+=crLHS10*(crLHS133*r_DN(1,0) + crLHS630 + crLHS632);
rLHS(5,32)+=crLHS10*(crLHS133*r_DN(1,1) + crLHS633 + crLHS634);
rLHS(5,33)+=crLHS10*(crLHS133*r_DN(1,2) + crLHS635 + crLHS636);
rLHS(5,34)+=crLHS637;
rLHS(5,35)+=crLHS641;
rLHS(5,36)+=crLHS10*(crLHS151*r_DN(1,0) + crLHS642 + crLHS644);
rLHS(5,37)+=crLHS10*(crLHS151*r_DN(1,1) + crLHS645 + crLHS646);
rLHS(5,38)+=crLHS10*(crLHS151*r_DN(1,2) + crLHS647 + crLHS648);
rLHS(5,39)+=crLHS649;
rLHS(6,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[1]*tau_u - crLHS205*crLHS206 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u - crLHS33 - crLHS650*r_DN(0,0));
rLHS(6,1)+=gauss_weight*(crLHS164*r_DN(1,0) + crLHS166*r_DN(1,1) + crLHS168*r_DN(1,2) + crLHS171*crLHS651 + crLHS657);
rLHS(6,2)+=gauss_weight*(crLHS181*r_DN(1,0) + crLHS183*r_DN(1,1) + crLHS186*r_DN(1,2) + crLHS189*crLHS651);
rLHS(6,3)+=gauss_weight*(crLHS190*r_DN(1,0) + crLHS192*r_DN(1,1) + crLHS194*r_DN(1,2) + crLHS197*crLHS651);
rLHS(6,4)+=-crLHS202*crLHS658;
rLHS(6,5)+=crLHS659*r_DN(1,0);
rLHS(6,6)+=gauss_weight*(crLHS207*r_DN(1,0) + crLHS209*r_DN(1,1) + crLHS211*r_DN(1,2) + crLHS214*crLHS651 + crLHS661);
rLHS(6,7)+=gauss_weight*(crLHS219*r_DN(1,0) + crLHS221*r_DN(1,1) + crLHS224*r_DN(1,2) + crLHS226*crLHS651);
rLHS(6,8)+=gauss_weight*(crLHS227*r_DN(1,0) + crLHS229*r_DN(1,1) + crLHS231*r_DN(1,2) + crLHS233*crLHS651);
rLHS(6,9)+=-crLHS235*crLHS658;
rLHS(6,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[1]*tau_u - crLHS206*crLHS581 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u - crLHS650*r_DN(2,0) - crLHS662);
rLHS(6,11)+=gauss_weight*(crLHS237*r_DN(1,0) + crLHS239*r_DN(1,1) + crLHS241*r_DN(1,2) + crLHS244*crLHS651 + crLHS665);
rLHS(6,12)+=gauss_weight*(crLHS249*r_DN(1,0) + crLHS251*r_DN(1,1) + crLHS254*r_DN(1,2) + crLHS256*crLHS651);
rLHS(6,13)+=gauss_weight*(crLHS257*r_DN(1,0) + crLHS259*r_DN(1,1) + crLHS261*r_DN(1,2) + crLHS263*crLHS651);
rLHS(6,14)+=-crLHS265*crLHS658;
rLHS(6,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[1]*tau_u - crLHS206*crLHS594 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u - crLHS650*r_DN(3,0) - crLHS666);
rLHS(6,16)+=gauss_weight*(crLHS267*r_DN(1,0) + crLHS269*r_DN(1,1) + crLHS271*r_DN(1,2) + crLHS274*crLHS651 + crLHS669);
rLHS(6,17)+=gauss_weight*(crLHS279*r_DN(1,0) + crLHS281*r_DN(1,1) + crLHS284*r_DN(1,2) + crLHS286*crLHS651);
rLHS(6,18)+=gauss_weight*(crLHS287*r_DN(1,0) + crLHS289*r_DN(1,1) + crLHS291*r_DN(1,2) + crLHS293*crLHS651);
rLHS(6,19)+=-crLHS295*crLHS658;
rLHS(6,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[1]*tau_u - crLHS206*crLHS606 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u - crLHS650*r_DN(4,0) - crLHS670);
rLHS(6,21)+=gauss_weight*(crLHS297*r_DN(1,0) + crLHS299*r_DN(1,1) + crLHS301*r_DN(1,2) + crLHS304*crLHS651 + crLHS673);
rLHS(6,22)+=gauss_weight*(crLHS309*r_DN(1,0) + crLHS311*r_DN(1,1) + crLHS314*r_DN(1,2) + crLHS316*crLHS651);
rLHS(6,23)+=gauss_weight*(crLHS317*r_DN(1,0) + crLHS319*r_DN(1,1) + crLHS321*r_DN(1,2) + crLHS323*crLHS651);
rLHS(6,24)+=-crLHS325*crLHS658;
rLHS(6,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[1]*tau_u - crLHS206*crLHS618 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*tau_u - crLHS650*r_DN(5,0) - crLHS674);
rLHS(6,26)+=gauss_weight*(crLHS327*r_DN(1,0) + crLHS329*r_DN(1,1) + crLHS331*r_DN(1,2) + crLHS334*crLHS651 + crLHS677);
rLHS(6,27)+=gauss_weight*(crLHS339*r_DN(1,0) + crLHS341*r_DN(1,1) + crLHS344*r_DN(1,2) + crLHS346*crLHS651);
rLHS(6,28)+=gauss_weight*(crLHS347*r_DN(1,0) + crLHS349*r_DN(1,1) + crLHS351*r_DN(1,2) + crLHS353*crLHS651);
rLHS(6,29)+=-crLHS355*crLHS658;
rLHS(6,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[1]*tau_u - crLHS206*crLHS630 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*tau_u - crLHS650*r_DN(6,0) - crLHS678);
rLHS(6,31)+=gauss_weight*(crLHS357*r_DN(1,0) + crLHS359*r_DN(1,1) + crLHS361*r_DN(1,2) + crLHS364*crLHS651 + crLHS681);
rLHS(6,32)+=gauss_weight*(crLHS369*r_DN(1,0) + crLHS371*r_DN(1,1) + crLHS374*r_DN(1,2) + crLHS376*crLHS651);
rLHS(6,33)+=gauss_weight*(crLHS377*r_DN(1,0) + crLHS379*r_DN(1,1) + crLHS381*r_DN(1,2) + crLHS383*crLHS651);
rLHS(6,34)+=-crLHS385*crLHS658;
rLHS(6,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[1]*tau_u - crLHS206*crLHS642 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*tau_u - crLHS650*r_DN(7,0) - crLHS682);
rLHS(6,36)+=gauss_weight*(crLHS387*r_DN(1,0) + crLHS389*r_DN(1,1) + crLHS391*r_DN(1,2) + crLHS393*crLHS651 + crLHS685);
rLHS(6,37)+=gauss_weight*(crLHS398*r_DN(1,0) + crLHS400*r_DN(1,1) + crLHS403*r_DN(1,2) + crLHS404*crLHS651);
rLHS(6,38)+=gauss_weight*(crLHS405*r_DN(1,0) + crLHS407*r_DN(1,1) + crLHS409*r_DN(1,2) + crLHS410*crLHS651);
rLHS(6,39)+=-crLHS412*crLHS658;
rLHS(7,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[1]*tau_u - crLHS206*crLHS423 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u - crLHS42 - crLHS650*r_DN(0,1));
rLHS(7,1)+=gauss_weight*(crLHS166*r_DN(1,0) + crLHS171*crLHS686 + crLHS413*r_DN(1,1) + crLHS414*r_DN(1,2));
rLHS(7,2)+=gauss_weight*(crLHS183*r_DN(1,0) + crLHS189*crLHS686 + crLHS416*r_DN(1,1) + crLHS418*r_DN(1,2) + crLHS657);
rLHS(7,3)+=gauss_weight*(crLHS192*r_DN(1,0) + crLHS197*crLHS686 + crLHS419*r_DN(1,1) + crLHS421*r_DN(1,2));
rLHS(7,4)+=-crLHS202*crLHS687;
rLHS(7,5)+=crLHS659*r_DN(1,1);
rLHS(7,6)+=gauss_weight*(crLHS209*r_DN(1,0) + crLHS214*crLHS686 + crLHS424*r_DN(1,1) + crLHS425*r_DN(1,2));
rLHS(7,7)+=gauss_weight*(crLHS221*r_DN(1,0) + crLHS226*crLHS686 + crLHS426*r_DN(1,1) + crLHS428*r_DN(1,2) + crLHS661);
rLHS(7,8)+=gauss_weight*(crLHS229*r_DN(1,0) + crLHS233*crLHS686 + crLHS429*r_DN(1,1) + crLHS431*r_DN(1,2));
rLHS(7,9)+=-crLHS235*crLHS687;
rLHS(7,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[1]*tau_u - crLHS206*crLHS584 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u - crLHS650*r_DN(2,1) - crLHS688);
rLHS(7,11)+=gauss_weight*(crLHS239*r_DN(1,0) + crLHS244*crLHS686 + crLHS433*r_DN(1,1) + crLHS434*r_DN(1,2));
rLHS(7,12)+=gauss_weight*(crLHS251*r_DN(1,0) + crLHS256*crLHS686 + crLHS435*r_DN(1,1) + crLHS437*r_DN(1,2) + crLHS665);
rLHS(7,13)+=gauss_weight*(crLHS259*r_DN(1,0) + crLHS263*crLHS686 + crLHS438*r_DN(1,1) + crLHS440*r_DN(1,2));
rLHS(7,14)+=-crLHS265*crLHS687;
rLHS(7,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[1]*tau_u - crLHS206*crLHS597 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u - crLHS650*r_DN(3,1) - crLHS689);
rLHS(7,16)+=gauss_weight*(crLHS269*r_DN(1,0) + crLHS274*crLHS686 + crLHS442*r_DN(1,1) + crLHS443*r_DN(1,2));
rLHS(7,17)+=gauss_weight*(crLHS281*r_DN(1,0) + crLHS286*crLHS686 + crLHS444*r_DN(1,1) + crLHS446*r_DN(1,2) + crLHS669);
rLHS(7,18)+=gauss_weight*(crLHS289*r_DN(1,0) + crLHS293*crLHS686 + crLHS447*r_DN(1,1) + crLHS449*r_DN(1,2));
rLHS(7,19)+=-crLHS295*crLHS687;
rLHS(7,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[1]*tau_u - crLHS206*crLHS609 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u - crLHS650*r_DN(4,1) - crLHS690);
rLHS(7,21)+=gauss_weight*(crLHS299*r_DN(1,0) + crLHS304*crLHS686 + crLHS451*r_DN(1,1) + crLHS452*r_DN(1,2));
rLHS(7,22)+=gauss_weight*(crLHS311*r_DN(1,0) + crLHS316*crLHS686 + crLHS453*r_DN(1,1) + crLHS455*r_DN(1,2) + crLHS673);
rLHS(7,23)+=gauss_weight*(crLHS319*r_DN(1,0) + crLHS323*crLHS686 + crLHS456*r_DN(1,1) + crLHS458*r_DN(1,2));
rLHS(7,24)+=-crLHS325*crLHS687;
rLHS(7,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[1]*tau_u - crLHS206*crLHS621 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*tau_u - crLHS650*r_DN(5,1) - crLHS691);
rLHS(7,26)+=gauss_weight*(crLHS329*r_DN(1,0) + crLHS334*crLHS686 + crLHS460*r_DN(1,1) + crLHS461*r_DN(1,2));
rLHS(7,27)+=gauss_weight*(crLHS341*r_DN(1,0) + crLHS346*crLHS686 + crLHS462*r_DN(1,1) + crLHS464*r_DN(1,2) + crLHS677);
rLHS(7,28)+=gauss_weight*(crLHS349*r_DN(1,0) + crLHS353*crLHS686 + crLHS465*r_DN(1,1) + crLHS467*r_DN(1,2));
rLHS(7,29)+=-crLHS355*crLHS687;
rLHS(7,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[1]*tau_u - crLHS206*crLHS633 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*tau_u - crLHS650*r_DN(6,1) - crLHS692);
rLHS(7,31)+=gauss_weight*(crLHS359*r_DN(1,0) + crLHS364*crLHS686 + crLHS469*r_DN(1,1) + crLHS470*r_DN(1,2));
rLHS(7,32)+=gauss_weight*(crLHS371*r_DN(1,0) + crLHS376*crLHS686 + crLHS471*r_DN(1,1) + crLHS473*r_DN(1,2) + crLHS681);
rLHS(7,33)+=gauss_weight*(crLHS379*r_DN(1,0) + crLHS383*crLHS686 + crLHS474*r_DN(1,1) + crLHS476*r_DN(1,2));
rLHS(7,34)+=-crLHS385*crLHS687;
rLHS(7,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[1]*tau_u - crLHS206*crLHS645 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*tau_u - crLHS650*r_DN(7,1) - crLHS693);
rLHS(7,36)+=gauss_weight*(crLHS389*r_DN(1,0) + crLHS393*crLHS686 + crLHS478*r_DN(1,1) + crLHS479*r_DN(1,2));
rLHS(7,37)+=gauss_weight*(crLHS400*r_DN(1,0) + crLHS404*crLHS686 + crLHS480*r_DN(1,1) + crLHS482*r_DN(1,2) + crLHS685);
rLHS(7,38)+=gauss_weight*(crLHS407*r_DN(1,0) + crLHS410*crLHS686 + crLHS483*r_DN(1,1) + crLHS485*r_DN(1,2));
rLHS(7,39)+=-crLHS412*crLHS687;
rLHS(8,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[1]*tau_u - crLHS206*crLHS491 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u - crLHS44 - crLHS650*r_DN(0,2));
rLHS(8,1)+=gauss_weight*(crLHS168*r_DN(1,0) + crLHS171*crLHS694 + crLHS414*r_DN(1,1) + crLHS486*r_DN(1,2));
rLHS(8,2)+=gauss_weight*(crLHS186*r_DN(1,0) + crLHS189*crLHS694 + crLHS418*r_DN(1,1) + crLHS488*r_DN(1,2));
rLHS(8,3)+=gauss_weight*(crLHS194*r_DN(1,0) + crLHS197*crLHS694 + crLHS421*r_DN(1,1) + crLHS489*r_DN(1,2) + crLHS657);
rLHS(8,4)+=-crLHS202*crLHS695;
rLHS(8,5)+=crLHS659*r_DN(1,2);
rLHS(8,6)+=gauss_weight*(crLHS211*r_DN(1,0) + crLHS214*crLHS694 + crLHS425*r_DN(1,1) + crLHS492*r_DN(1,2));
rLHS(8,7)+=gauss_weight*(crLHS224*r_DN(1,0) + crLHS226*crLHS694 + crLHS428*r_DN(1,1) + crLHS493*r_DN(1,2));
rLHS(8,8)+=gauss_weight*(crLHS231*r_DN(1,0) + crLHS233*crLHS694 + crLHS431*r_DN(1,1) + crLHS494*r_DN(1,2) + crLHS661);
rLHS(8,9)+=-crLHS235*crLHS695;
rLHS(8,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[1]*tau_u - crLHS206*crLHS586 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u - crLHS650*r_DN(2,2) - crLHS696);
rLHS(8,11)+=gauss_weight*(crLHS241*r_DN(1,0) + crLHS244*crLHS694 + crLHS434*r_DN(1,1) + crLHS496*r_DN(1,2));
rLHS(8,12)+=gauss_weight*(crLHS254*r_DN(1,0) + crLHS256*crLHS694 + crLHS437*r_DN(1,1) + crLHS497*r_DN(1,2));
rLHS(8,13)+=gauss_weight*(crLHS261*r_DN(1,0) + crLHS263*crLHS694 + crLHS440*r_DN(1,1) + crLHS498*r_DN(1,2) + crLHS665);
rLHS(8,14)+=-crLHS265*crLHS695;
rLHS(8,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[1]*tau_u - crLHS206*crLHS599 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u - crLHS650*r_DN(3,2) - crLHS697);
rLHS(8,16)+=gauss_weight*(crLHS271*r_DN(1,0) + crLHS274*crLHS694 + crLHS443*r_DN(1,1) + crLHS500*r_DN(1,2));
rLHS(8,17)+=gauss_weight*(crLHS284*r_DN(1,0) + crLHS286*crLHS694 + crLHS446*r_DN(1,1) + crLHS501*r_DN(1,2));
rLHS(8,18)+=gauss_weight*(crLHS291*r_DN(1,0) + crLHS293*crLHS694 + crLHS449*r_DN(1,1) + crLHS502*r_DN(1,2) + crLHS669);
rLHS(8,19)+=-crLHS295*crLHS695;
rLHS(8,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[1]*tau_u - crLHS206*crLHS611 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u - crLHS650*r_DN(4,2) - crLHS698);
rLHS(8,21)+=gauss_weight*(crLHS301*r_DN(1,0) + crLHS304*crLHS694 + crLHS452*r_DN(1,1) + crLHS504*r_DN(1,2));
rLHS(8,22)+=gauss_weight*(crLHS314*r_DN(1,0) + crLHS316*crLHS694 + crLHS455*r_DN(1,1) + crLHS505*r_DN(1,2));
rLHS(8,23)+=gauss_weight*(crLHS321*r_DN(1,0) + crLHS323*crLHS694 + crLHS458*r_DN(1,1) + crLHS506*r_DN(1,2) + crLHS673);
rLHS(8,24)+=-crLHS325*crLHS695;
rLHS(8,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[1]*tau_u - crLHS206*crLHS623 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*tau_u - crLHS650*r_DN(5,2) - crLHS699);
rLHS(8,26)+=gauss_weight*(crLHS331*r_DN(1,0) + crLHS334*crLHS694 + crLHS461*r_DN(1,1) + crLHS508*r_DN(1,2));
rLHS(8,27)+=gauss_weight*(crLHS344*r_DN(1,0) + crLHS346*crLHS694 + crLHS464*r_DN(1,1) + crLHS509*r_DN(1,2));
rLHS(8,28)+=gauss_weight*(crLHS351*r_DN(1,0) + crLHS353*crLHS694 + crLHS467*r_DN(1,1) + crLHS510*r_DN(1,2) + crLHS677);
rLHS(8,29)+=-crLHS355*crLHS695;
rLHS(8,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[1]*tau_u - crLHS206*crLHS635 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*tau_u - crLHS650*r_DN(6,2) - crLHS700);
rLHS(8,31)+=gauss_weight*(crLHS361*r_DN(1,0) + crLHS364*crLHS694 + crLHS470*r_DN(1,1) + crLHS512*r_DN(1,2));
rLHS(8,32)+=gauss_weight*(crLHS374*r_DN(1,0) + crLHS376*crLHS694 + crLHS473*r_DN(1,1) + crLHS513*r_DN(1,2));
rLHS(8,33)+=gauss_weight*(crLHS381*r_DN(1,0) + crLHS383*crLHS694 + crLHS476*r_DN(1,1) + crLHS514*r_DN(1,2) + crLHS681);
rLHS(8,34)+=-crLHS385*crLHS695;
rLHS(8,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[1]*tau_u - crLHS206*crLHS647 + crLHS3*crLHS39*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*tau_u - crLHS650*r_DN(7,2) - crLHS701);
rLHS(8,36)+=gauss_weight*(crLHS391*r_DN(1,0) + crLHS393*crLHS694 + crLHS479*r_DN(1,1) + crLHS516*r_DN(1,2));
rLHS(8,37)+=gauss_weight*(crLHS403*r_DN(1,0) + crLHS404*crLHS694 + crLHS482*r_DN(1,1) + crLHS517*r_DN(1,2));
rLHS(8,38)+=gauss_weight*(crLHS409*r_DN(1,0) + crLHS410*crLHS694 + crLHS485*r_DN(1,1) + crLHS518*r_DN(1,2) + crLHS685);
rLHS(8,39)+=-crLHS412*crLHS695;
rLHS(9,0)+=0;
rLHS(9,1)+=crLHS530;
rLHS(9,2)+=crLHS531;
rLHS(9,3)+=crLHS532;
rLHS(9,4)+=gauss_weight*(crLHS201*crLHS215 - crLHS521*crLHS702 - crLHS521*crLHS703 + crLHS521*crLHS704 - crLHS521*crLHS705 + crLHS535);
rLHS(9,5)+=0;
rLHS(9,6)+=crLHS169*crLHS706;
rLHS(9,7)+=crLHS187*crLHS706;
rLHS(9,8)+=crLHS195*crLHS706;
rLHS(9,9)+=gauss_weight*(crLHS215*crLHS234 - crLHS534*crLHS702 - crLHS534*crLHS703 + crLHS534*crLHS704 - crLHS534*crLHS705 + crLHS572*kappa + crLHS573*kappa + crLHS574*kappa - crLHS576*dp_th_dt + crLHS660);
rLHS(9,10)+=0;
rLHS(9,11)+=crLHS707;
rLHS(9,12)+=crLHS708;
rLHS(9,13)+=crLHS709;
rLHS(9,14)+=gauss_weight*(crLHS215*crLHS264 - crLHS540*crLHS702 - crLHS540*crLHS703 + crLHS540*crLHS704 - crLHS540*crLHS705 + crLHS710);
rLHS(9,15)+=0;
rLHS(9,16)+=crLHS711;
rLHS(9,17)+=crLHS712;
rLHS(9,18)+=crLHS713;
rLHS(9,19)+=gauss_weight*(crLHS215*crLHS294 - crLHS546*crLHS702 - crLHS546*crLHS703 + crLHS546*crLHS704 - crLHS546*crLHS705 + crLHS714);
rLHS(9,20)+=0;
rLHS(9,21)+=crLHS715;
rLHS(9,22)+=crLHS716;
rLHS(9,23)+=crLHS717;
rLHS(9,24)+=gauss_weight*(crLHS215*crLHS324 - crLHS552*crLHS702 - crLHS552*crLHS703 + crLHS552*crLHS704 - crLHS552*crLHS705 + crLHS718);
rLHS(9,25)+=0;
rLHS(9,26)+=crLHS719;
rLHS(9,27)+=crLHS720;
rLHS(9,28)+=crLHS721;
rLHS(9,29)+=gauss_weight*(crLHS215*crLHS354 - crLHS558*crLHS702 - crLHS558*crLHS703 + crLHS558*crLHS704 - crLHS558*crLHS705 + crLHS722);
rLHS(9,30)+=0;
rLHS(9,31)+=crLHS723;
rLHS(9,32)+=crLHS724;
rLHS(9,33)+=crLHS725;
rLHS(9,34)+=gauss_weight*(crLHS215*crLHS384 - crLHS564*crLHS702 - crLHS564*crLHS703 + crLHS564*crLHS704 - crLHS564*crLHS705 + crLHS726);
rLHS(9,35)+=0;
rLHS(9,36)+=crLHS727;
rLHS(9,37)+=crLHS728;
rLHS(9,38)+=crLHS729;
rLHS(9,39)+=gauss_weight*(crLHS215*crLHS411 - crLHS570*crLHS702 - crLHS570*crLHS703 + crLHS570*crLHS704 - crLHS570*crLHS705 + crLHS730);
rLHS(10,0)+=crLHS53;
rLHS(10,1)+=crLHS10*(crLHS22*r_DN(2,0) + crLHS236 + crLHS56);
rLHS(10,2)+=crLHS10*(crLHS22*r_DN(2,1) + crLHS432 + crLHS63);
rLHS(10,3)+=crLHS10*(crLHS22*r_DN(2,2) + crLHS495 + crLHS65);
rLHS(10,4)+=crLHS67;
rLHS(10,5)+=crLHS580;
rLHS(10,6)+=crLHS10*(crLHS41*r_DN(2,0) + crLHS583 + crLHS662);
rLHS(10,7)+=crLHS10*(crLHS41*r_DN(2,1) + crLHS585 + crLHS688);
rLHS(10,8)+=crLHS10*(crLHS41*r_DN(2,2) + crLHS587 + crLHS696);
rLHS(10,9)+=crLHS589;
rLHS(10,10)+=crLHS11*(crLHS731 + crLHS732 + crLHS733);
rLHS(10,11)+=crLHS10*(-crLHS12*crLHS735 + crLHS61*r_DN(2,0) + r_DN(2,0)*r_N[2]);
rLHS(10,12)+=crLHS10*(-crLHS23*crLHS735 + crLHS61*r_DN(2,1) + r_DN(2,1)*r_N[2]);
rLHS(10,13)+=crLHS10*(-crLHS24*crLHS735 + crLHS61*r_DN(2,2) + r_DN(2,2)*r_N[2]);
rLHS(10,14)+=-crLHS28*crLHS734;
rLHS(10,15)+=crLHS739;
rLHS(10,16)+=crLHS10*(crLHS740 + crLHS742 + crLHS79*r_DN(2,0));
rLHS(10,17)+=crLHS10*(crLHS743 + crLHS744 + crLHS79*r_DN(2,1));
rLHS(10,18)+=crLHS10*(crLHS745 + crLHS746 + crLHS79*r_DN(2,2));
rLHS(10,19)+=crLHS748;
rLHS(10,20)+=crLHS752;
rLHS(10,21)+=crLHS10*(crLHS753 + crLHS755 + crLHS97*r_DN(2,0));
rLHS(10,22)+=crLHS10*(crLHS756 + crLHS757 + crLHS97*r_DN(2,1));
rLHS(10,23)+=crLHS10*(crLHS758 + crLHS759 + crLHS97*r_DN(2,2));
rLHS(10,24)+=crLHS760;
rLHS(10,25)+=crLHS764;
rLHS(10,26)+=crLHS10*(crLHS115*r_DN(2,0) + crLHS765 + crLHS767);
rLHS(10,27)+=crLHS10*(crLHS115*r_DN(2,1) + crLHS768 + crLHS769);
rLHS(10,28)+=crLHS10*(crLHS115*r_DN(2,2) + crLHS770 + crLHS771);
rLHS(10,29)+=crLHS772;
rLHS(10,30)+=crLHS776;
rLHS(10,31)+=crLHS10*(crLHS133*r_DN(2,0) + crLHS777 + crLHS779);
rLHS(10,32)+=crLHS10*(crLHS133*r_DN(2,1) + crLHS780 + crLHS781);
rLHS(10,33)+=crLHS10*(crLHS133*r_DN(2,2) + crLHS782 + crLHS783);
rLHS(10,34)+=crLHS784;
rLHS(10,35)+=crLHS788;
rLHS(10,36)+=crLHS10*(crLHS151*r_DN(2,0) + crLHS789 + crLHS791);
rLHS(10,37)+=crLHS10*(crLHS151*r_DN(2,1) + crLHS792 + crLHS793);
rLHS(10,38)+=crLHS10*(crLHS151*r_DN(2,2) + crLHS794 + crLHS795);
rLHS(10,39)+=crLHS796;
rLHS(11,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[2]*tau_u - crLHS206*crLHS236 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u - crLHS54 - crLHS797*r_DN(0,0));
rLHS(11,1)+=gauss_weight*(crLHS164*r_DN(2,0) + crLHS166*r_DN(2,1) + crLHS168*r_DN(2,2) + crLHS171*crLHS798 + crLHS804);
rLHS(11,2)+=gauss_weight*(crLHS181*r_DN(2,0) + crLHS183*r_DN(2,1) + crLHS186*r_DN(2,2) + crLHS189*crLHS798);
rLHS(11,3)+=gauss_weight*(crLHS190*r_DN(2,0) + crLHS192*r_DN(2,1) + crLHS194*r_DN(2,2) + crLHS197*crLHS798);
rLHS(11,4)+=-crLHS202*crLHS805;
rLHS(11,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[2]*tau_u - crLHS206*crLHS662 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u - crLHS581 - crLHS797*r_DN(1,0));
rLHS(11,6)+=gauss_weight*(crLHS207*r_DN(2,0) + crLHS209*r_DN(2,1) + crLHS211*r_DN(2,2) + crLHS214*crLHS798 + crLHS806);
rLHS(11,7)+=gauss_weight*(crLHS219*r_DN(2,0) + crLHS221*r_DN(2,1) + crLHS224*r_DN(2,2) + crLHS226*crLHS798);
rLHS(11,8)+=gauss_weight*(crLHS227*r_DN(2,0) + crLHS229*r_DN(2,1) + crLHS231*r_DN(2,2) + crLHS233*crLHS798);
rLHS(11,9)+=-crLHS235*crLHS805;
rLHS(11,10)+=crLHS807*r_DN(2,0);
rLHS(11,11)+=gauss_weight*(crLHS237*r_DN(2,0) + crLHS239*r_DN(2,1) + crLHS241*r_DN(2,2) + crLHS244*crLHS798 + crLHS809);
rLHS(11,12)+=gauss_weight*(crLHS249*r_DN(2,0) + crLHS251*r_DN(2,1) + crLHS254*r_DN(2,2) + crLHS256*crLHS798);
rLHS(11,13)+=gauss_weight*(crLHS257*r_DN(2,0) + crLHS259*r_DN(2,1) + crLHS261*r_DN(2,2) + crLHS263*crLHS798);
rLHS(11,14)+=-crLHS265*crLHS805;
rLHS(11,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[2]*tau_u - crLHS206*crLHS740 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u - crLHS797*r_DN(3,0) - crLHS810);
rLHS(11,16)+=gauss_weight*(crLHS267*r_DN(2,0) + crLHS269*r_DN(2,1) + crLHS271*r_DN(2,2) + crLHS274*crLHS798 + crLHS813);
rLHS(11,17)+=gauss_weight*(crLHS279*r_DN(2,0) + crLHS281*r_DN(2,1) + crLHS284*r_DN(2,2) + crLHS286*crLHS798);
rLHS(11,18)+=gauss_weight*(crLHS287*r_DN(2,0) + crLHS289*r_DN(2,1) + crLHS291*r_DN(2,2) + crLHS293*crLHS798);
rLHS(11,19)+=-crLHS295*crLHS805;
rLHS(11,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[2]*tau_u - crLHS206*crLHS753 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u - crLHS797*r_DN(4,0) - crLHS814);
rLHS(11,21)+=gauss_weight*(crLHS297*r_DN(2,0) + crLHS299*r_DN(2,1) + crLHS301*r_DN(2,2) + crLHS304*crLHS798 + crLHS817);
rLHS(11,22)+=gauss_weight*(crLHS309*r_DN(2,0) + crLHS311*r_DN(2,1) + crLHS314*r_DN(2,2) + crLHS316*crLHS798);
rLHS(11,23)+=gauss_weight*(crLHS317*r_DN(2,0) + crLHS319*r_DN(2,1) + crLHS321*r_DN(2,2) + crLHS323*crLHS798);
rLHS(11,24)+=-crLHS325*crLHS805;
rLHS(11,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[2]*tau_u - crLHS206*crLHS765 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*tau_u - crLHS797*r_DN(5,0) - crLHS818);
rLHS(11,26)+=gauss_weight*(crLHS327*r_DN(2,0) + crLHS329*r_DN(2,1) + crLHS331*r_DN(2,2) + crLHS334*crLHS798 + crLHS821);
rLHS(11,27)+=gauss_weight*(crLHS339*r_DN(2,0) + crLHS341*r_DN(2,1) + crLHS344*r_DN(2,2) + crLHS346*crLHS798);
rLHS(11,28)+=gauss_weight*(crLHS347*r_DN(2,0) + crLHS349*r_DN(2,1) + crLHS351*r_DN(2,2) + crLHS353*crLHS798);
rLHS(11,29)+=-crLHS355*crLHS805;
rLHS(11,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[2]*tau_u - crLHS206*crLHS777 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*tau_u - crLHS797*r_DN(6,0) - crLHS822);
rLHS(11,31)+=gauss_weight*(crLHS357*r_DN(2,0) + crLHS359*r_DN(2,1) + crLHS361*r_DN(2,2) + crLHS364*crLHS798 + crLHS825);
rLHS(11,32)+=gauss_weight*(crLHS369*r_DN(2,0) + crLHS371*r_DN(2,1) + crLHS374*r_DN(2,2) + crLHS376*crLHS798);
rLHS(11,33)+=gauss_weight*(crLHS377*r_DN(2,0) + crLHS379*r_DN(2,1) + crLHS381*r_DN(2,2) + crLHS383*crLHS798);
rLHS(11,34)+=-crLHS385*crLHS805;
rLHS(11,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[2]*tau_u - crLHS206*crLHS789 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*tau_u - crLHS797*r_DN(7,0) - crLHS826);
rLHS(11,36)+=gauss_weight*(crLHS387*r_DN(2,0) + crLHS389*r_DN(2,1) + crLHS391*r_DN(2,2) + crLHS393*crLHS798 + crLHS829);
rLHS(11,37)+=gauss_weight*(crLHS398*r_DN(2,0) + crLHS400*r_DN(2,1) + crLHS403*r_DN(2,2) + crLHS404*crLHS798);
rLHS(11,38)+=gauss_weight*(crLHS405*r_DN(2,0) + crLHS407*r_DN(2,1) + crLHS409*r_DN(2,2) + crLHS410*crLHS798);
rLHS(11,39)+=-crLHS412*crLHS805;
rLHS(12,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[2]*tau_u - crLHS206*crLHS432 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u - crLHS62 - crLHS797*r_DN(0,1));
rLHS(12,1)+=gauss_weight*(crLHS166*r_DN(2,0) + crLHS171*crLHS830 + crLHS413*r_DN(2,1) + crLHS414*r_DN(2,2));
rLHS(12,2)+=gauss_weight*(crLHS183*r_DN(2,0) + crLHS189*crLHS830 + crLHS416*r_DN(2,1) + crLHS418*r_DN(2,2) + crLHS804);
rLHS(12,3)+=gauss_weight*(crLHS192*r_DN(2,0) + crLHS197*crLHS830 + crLHS419*r_DN(2,1) + crLHS421*r_DN(2,2));
rLHS(12,4)+=-crLHS202*crLHS831;
rLHS(12,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[2]*tau_u - crLHS206*crLHS688 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u - crLHS584 - crLHS797*r_DN(1,1));
rLHS(12,6)+=gauss_weight*(crLHS209*r_DN(2,0) + crLHS214*crLHS830 + crLHS424*r_DN(2,1) + crLHS425*r_DN(2,2));
rLHS(12,7)+=gauss_weight*(crLHS221*r_DN(2,0) + crLHS226*crLHS830 + crLHS426*r_DN(2,1) + crLHS428*r_DN(2,2) + crLHS806);
rLHS(12,8)+=gauss_weight*(crLHS229*r_DN(2,0) + crLHS233*crLHS830 + crLHS429*r_DN(2,1) + crLHS431*r_DN(2,2));
rLHS(12,9)+=-crLHS235*crLHS831;
rLHS(12,10)+=crLHS807*r_DN(2,1);
rLHS(12,11)+=gauss_weight*(crLHS239*r_DN(2,0) + crLHS244*crLHS830 + crLHS433*r_DN(2,1) + crLHS434*r_DN(2,2));
rLHS(12,12)+=gauss_weight*(crLHS251*r_DN(2,0) + crLHS256*crLHS830 + crLHS435*r_DN(2,1) + crLHS437*r_DN(2,2) + crLHS809);
rLHS(12,13)+=gauss_weight*(crLHS259*r_DN(2,0) + crLHS263*crLHS830 + crLHS438*r_DN(2,1) + crLHS440*r_DN(2,2));
rLHS(12,14)+=-crLHS265*crLHS831;
rLHS(12,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[2]*tau_u - crLHS206*crLHS743 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u - crLHS797*r_DN(3,1) - crLHS832);
rLHS(12,16)+=gauss_weight*(crLHS269*r_DN(2,0) + crLHS274*crLHS830 + crLHS442*r_DN(2,1) + crLHS443*r_DN(2,2));
rLHS(12,17)+=gauss_weight*(crLHS281*r_DN(2,0) + crLHS286*crLHS830 + crLHS444*r_DN(2,1) + crLHS446*r_DN(2,2) + crLHS813);
rLHS(12,18)+=gauss_weight*(crLHS289*r_DN(2,0) + crLHS293*crLHS830 + crLHS447*r_DN(2,1) + crLHS449*r_DN(2,2));
rLHS(12,19)+=-crLHS295*crLHS831;
rLHS(12,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[2]*tau_u - crLHS206*crLHS756 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u - crLHS797*r_DN(4,1) - crLHS833);
rLHS(12,21)+=gauss_weight*(crLHS299*r_DN(2,0) + crLHS304*crLHS830 + crLHS451*r_DN(2,1) + crLHS452*r_DN(2,2));
rLHS(12,22)+=gauss_weight*(crLHS311*r_DN(2,0) + crLHS316*crLHS830 + crLHS453*r_DN(2,1) + crLHS455*r_DN(2,2) + crLHS817);
rLHS(12,23)+=gauss_weight*(crLHS319*r_DN(2,0) + crLHS323*crLHS830 + crLHS456*r_DN(2,1) + crLHS458*r_DN(2,2));
rLHS(12,24)+=-crLHS325*crLHS831;
rLHS(12,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[2]*tau_u - crLHS206*crLHS768 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*tau_u - crLHS797*r_DN(5,1) - crLHS834);
rLHS(12,26)+=gauss_weight*(crLHS329*r_DN(2,0) + crLHS334*crLHS830 + crLHS460*r_DN(2,1) + crLHS461*r_DN(2,2));
rLHS(12,27)+=gauss_weight*(crLHS341*r_DN(2,0) + crLHS346*crLHS830 + crLHS462*r_DN(2,1) + crLHS464*r_DN(2,2) + crLHS821);
rLHS(12,28)+=gauss_weight*(crLHS349*r_DN(2,0) + crLHS353*crLHS830 + crLHS465*r_DN(2,1) + crLHS467*r_DN(2,2));
rLHS(12,29)+=-crLHS355*crLHS831;
rLHS(12,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[2]*tau_u - crLHS206*crLHS780 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*tau_u - crLHS797*r_DN(6,1) - crLHS835);
rLHS(12,31)+=gauss_weight*(crLHS359*r_DN(2,0) + crLHS364*crLHS830 + crLHS469*r_DN(2,1) + crLHS470*r_DN(2,2));
rLHS(12,32)+=gauss_weight*(crLHS371*r_DN(2,0) + crLHS376*crLHS830 + crLHS471*r_DN(2,1) + crLHS473*r_DN(2,2) + crLHS825);
rLHS(12,33)+=gauss_weight*(crLHS379*r_DN(2,0) + crLHS383*crLHS830 + crLHS474*r_DN(2,1) + crLHS476*r_DN(2,2));
rLHS(12,34)+=-crLHS385*crLHS831;
rLHS(12,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[2]*tau_u - crLHS206*crLHS792 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*tau_u - crLHS797*r_DN(7,1) - crLHS836);
rLHS(12,36)+=gauss_weight*(crLHS389*r_DN(2,0) + crLHS393*crLHS830 + crLHS478*r_DN(2,1) + crLHS479*r_DN(2,2));
rLHS(12,37)+=gauss_weight*(crLHS400*r_DN(2,0) + crLHS404*crLHS830 + crLHS480*r_DN(2,1) + crLHS482*r_DN(2,2) + crLHS829);
rLHS(12,38)+=gauss_weight*(crLHS407*r_DN(2,0) + crLHS410*crLHS830 + crLHS483*r_DN(2,1) + crLHS485*r_DN(2,2));
rLHS(12,39)+=-crLHS412*crLHS831;
rLHS(13,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[2]*tau_u - crLHS206*crLHS495 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u - crLHS64 - crLHS797*r_DN(0,2));
rLHS(13,1)+=gauss_weight*(crLHS168*r_DN(2,0) + crLHS171*crLHS837 + crLHS414*r_DN(2,1) + crLHS486*r_DN(2,2));
rLHS(13,2)+=gauss_weight*(crLHS186*r_DN(2,0) + crLHS189*crLHS837 + crLHS418*r_DN(2,1) + crLHS488*r_DN(2,2));
rLHS(13,3)+=gauss_weight*(crLHS194*r_DN(2,0) + crLHS197*crLHS837 + crLHS421*r_DN(2,1) + crLHS489*r_DN(2,2) + crLHS804);
rLHS(13,4)+=-crLHS202*crLHS838;
rLHS(13,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[2]*tau_u - crLHS206*crLHS696 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u - crLHS586 - crLHS797*r_DN(1,2));
rLHS(13,6)+=gauss_weight*(crLHS211*r_DN(2,0) + crLHS214*crLHS837 + crLHS425*r_DN(2,1) + crLHS492*r_DN(2,2));
rLHS(13,7)+=gauss_weight*(crLHS224*r_DN(2,0) + crLHS226*crLHS837 + crLHS428*r_DN(2,1) + crLHS493*r_DN(2,2));
rLHS(13,8)+=gauss_weight*(crLHS231*r_DN(2,0) + crLHS233*crLHS837 + crLHS431*r_DN(2,1) + crLHS494*r_DN(2,2) + crLHS806);
rLHS(13,9)+=-crLHS235*crLHS838;
rLHS(13,10)+=crLHS807*r_DN(2,2);
rLHS(13,11)+=gauss_weight*(crLHS241*r_DN(2,0) + crLHS244*crLHS837 + crLHS434*r_DN(2,1) + crLHS496*r_DN(2,2));
rLHS(13,12)+=gauss_weight*(crLHS254*r_DN(2,0) + crLHS256*crLHS837 + crLHS437*r_DN(2,1) + crLHS497*r_DN(2,2));
rLHS(13,13)+=gauss_weight*(crLHS261*r_DN(2,0) + crLHS263*crLHS837 + crLHS440*r_DN(2,1) + crLHS498*r_DN(2,2) + crLHS809);
rLHS(13,14)+=-crLHS265*crLHS838;
rLHS(13,15)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[2]*tau_u - crLHS206*crLHS745 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u - crLHS797*r_DN(3,2) - crLHS839);
rLHS(13,16)+=gauss_weight*(crLHS271*r_DN(2,0) + crLHS274*crLHS837 + crLHS443*r_DN(2,1) + crLHS500*r_DN(2,2));
rLHS(13,17)+=gauss_weight*(crLHS284*r_DN(2,0) + crLHS286*crLHS837 + crLHS446*r_DN(2,1) + crLHS501*r_DN(2,2));
rLHS(13,18)+=gauss_weight*(crLHS291*r_DN(2,0) + crLHS293*crLHS837 + crLHS449*r_DN(2,1) + crLHS502*r_DN(2,2) + crLHS813);
rLHS(13,19)+=-crLHS295*crLHS838;
rLHS(13,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[2]*tau_u - crLHS206*crLHS758 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u - crLHS797*r_DN(4,2) - crLHS840);
rLHS(13,21)+=gauss_weight*(crLHS301*r_DN(2,0) + crLHS304*crLHS837 + crLHS452*r_DN(2,1) + crLHS504*r_DN(2,2));
rLHS(13,22)+=gauss_weight*(crLHS314*r_DN(2,0) + crLHS316*crLHS837 + crLHS455*r_DN(2,1) + crLHS505*r_DN(2,2));
rLHS(13,23)+=gauss_weight*(crLHS321*r_DN(2,0) + crLHS323*crLHS837 + crLHS458*r_DN(2,1) + crLHS506*r_DN(2,2) + crLHS817);
rLHS(13,24)+=-crLHS325*crLHS838;
rLHS(13,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[2]*tau_u - crLHS206*crLHS770 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*tau_u - crLHS797*r_DN(5,2) - crLHS841);
rLHS(13,26)+=gauss_weight*(crLHS331*r_DN(2,0) + crLHS334*crLHS837 + crLHS461*r_DN(2,1) + crLHS508*r_DN(2,2));
rLHS(13,27)+=gauss_weight*(crLHS344*r_DN(2,0) + crLHS346*crLHS837 + crLHS464*r_DN(2,1) + crLHS509*r_DN(2,2));
rLHS(13,28)+=gauss_weight*(crLHS351*r_DN(2,0) + crLHS353*crLHS837 + crLHS467*r_DN(2,1) + crLHS510*r_DN(2,2) + crLHS821);
rLHS(13,29)+=-crLHS355*crLHS838;
rLHS(13,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[2]*tau_u - crLHS206*crLHS782 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*tau_u - crLHS797*r_DN(6,2) - crLHS842);
rLHS(13,31)+=gauss_weight*(crLHS361*r_DN(2,0) + crLHS364*crLHS837 + crLHS470*r_DN(2,1) + crLHS512*r_DN(2,2));
rLHS(13,32)+=gauss_weight*(crLHS374*r_DN(2,0) + crLHS376*crLHS837 + crLHS473*r_DN(2,1) + crLHS513*r_DN(2,2));
rLHS(13,33)+=gauss_weight*(crLHS381*r_DN(2,0) + crLHS383*crLHS837 + crLHS476*r_DN(2,1) + crLHS514*r_DN(2,2) + crLHS825);
rLHS(13,34)+=-crLHS385*crLHS838;
rLHS(13,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[2]*tau_u - crLHS206*crLHS794 + crLHS3*crLHS59*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*tau_u - crLHS797*r_DN(7,2) - crLHS843);
rLHS(13,36)+=gauss_weight*(crLHS391*r_DN(2,0) + crLHS393*crLHS837 + crLHS479*r_DN(2,1) + crLHS516*r_DN(2,2));
rLHS(13,37)+=gauss_weight*(crLHS403*r_DN(2,0) + crLHS404*crLHS837 + crLHS482*r_DN(2,1) + crLHS517*r_DN(2,2));
rLHS(13,38)+=gauss_weight*(crLHS409*r_DN(2,0) + crLHS410*crLHS837 + crLHS485*r_DN(2,1) + crLHS518*r_DN(2,2) + crLHS829);
rLHS(13,39)+=-crLHS412*crLHS838;
rLHS(14,0)+=0;
rLHS(14,1)+=crLHS536;
rLHS(14,2)+=crLHS537;
rLHS(14,3)+=crLHS538;
rLHS(14,4)+=gauss_weight*(crLHS201*crLHS245 - crLHS521*crLHS844 - crLHS521*crLHS845 + crLHS521*crLHS846 - crLHS521*crLHS847 + crLHS541);
rLHS(14,5)+=0;
rLHS(14,6)+=crLHS707;
rLHS(14,7)+=crLHS708;
rLHS(14,8)+=crLHS709;
rLHS(14,9)+=gauss_weight*(crLHS234*crLHS245 - crLHS534*crLHS844 - crLHS534*crLHS845 + crLHS534*crLHS846 - crLHS534*crLHS847 + crLHS710);
rLHS(14,10)+=0;
rLHS(14,11)+=crLHS169*crLHS848;
rLHS(14,12)+=crLHS187*crLHS848;
rLHS(14,13)+=crLHS195*crLHS848;
rLHS(14,14)+=gauss_weight*(crLHS245*crLHS264 - crLHS540*crLHS844 - crLHS540*crLHS845 + crLHS540*crLHS846 - crLHS540*crLHS847 + crLHS731*kappa + crLHS732*kappa + crLHS733*kappa - crLHS735*dp_th_dt + crLHS808);
rLHS(14,15)+=0;
rLHS(14,16)+=crLHS849;
rLHS(14,17)+=crLHS850;
rLHS(14,18)+=crLHS851;
rLHS(14,19)+=gauss_weight*(crLHS245*crLHS294 - crLHS546*crLHS844 - crLHS546*crLHS845 + crLHS546*crLHS846 - crLHS546*crLHS847 + crLHS852);
rLHS(14,20)+=0;
rLHS(14,21)+=crLHS853;
rLHS(14,22)+=crLHS854;
rLHS(14,23)+=crLHS855;
rLHS(14,24)+=gauss_weight*(crLHS245*crLHS324 - crLHS552*crLHS844 - crLHS552*crLHS845 + crLHS552*crLHS846 - crLHS552*crLHS847 + crLHS856);
rLHS(14,25)+=0;
rLHS(14,26)+=crLHS857;
rLHS(14,27)+=crLHS858;
rLHS(14,28)+=crLHS859;
rLHS(14,29)+=gauss_weight*(crLHS245*crLHS354 - crLHS558*crLHS844 - crLHS558*crLHS845 + crLHS558*crLHS846 - crLHS558*crLHS847 + crLHS860);
rLHS(14,30)+=0;
rLHS(14,31)+=crLHS861;
rLHS(14,32)+=crLHS862;
rLHS(14,33)+=crLHS863;
rLHS(14,34)+=gauss_weight*(crLHS245*crLHS384 - crLHS564*crLHS844 - crLHS564*crLHS845 + crLHS564*crLHS846 - crLHS564*crLHS847 + crLHS864);
rLHS(14,35)+=0;
rLHS(14,36)+=crLHS865;
rLHS(14,37)+=crLHS866;
rLHS(14,38)+=crLHS867;
rLHS(14,39)+=gauss_weight*(crLHS245*crLHS411 - crLHS570*crLHS844 - crLHS570*crLHS845 + crLHS570*crLHS846 - crLHS570*crLHS847 + crLHS868);
rLHS(15,0)+=crLHS71;
rLHS(15,1)+=crLHS10*(crLHS22*r_DN(3,0) + crLHS266 + crLHS74);
rLHS(15,2)+=crLHS10*(crLHS22*r_DN(3,1) + crLHS441 + crLHS81);
rLHS(15,3)+=crLHS10*(crLHS22*r_DN(3,2) + crLHS499 + crLHS83);
rLHS(15,4)+=crLHS85;
rLHS(15,5)+=crLHS593;
rLHS(15,6)+=crLHS10*(crLHS41*r_DN(3,0) + crLHS596 + crLHS666);
rLHS(15,7)+=crLHS10*(crLHS41*r_DN(3,1) + crLHS598 + crLHS689);
rLHS(15,8)+=crLHS10*(crLHS41*r_DN(3,2) + crLHS600 + crLHS697);
rLHS(15,9)+=crLHS601;
rLHS(15,10)+=crLHS739;
rLHS(15,11)+=crLHS10*(crLHS61*r_DN(3,0) + crLHS742 + crLHS810);
rLHS(15,12)+=crLHS10*(crLHS61*r_DN(3,1) + crLHS744 + crLHS832);
rLHS(15,13)+=crLHS10*(crLHS61*r_DN(3,2) + crLHS746 + crLHS839);
rLHS(15,14)+=crLHS748;
rLHS(15,15)+=crLHS11*(crLHS869 + crLHS870 + crLHS871);
rLHS(15,16)+=crLHS10*(-crLHS12*crLHS873 + crLHS79*r_DN(3,0) + r_DN(3,0)*r_N[3]);
rLHS(15,17)+=crLHS10*(-crLHS23*crLHS873 + crLHS79*r_DN(3,1) + r_DN(3,1)*r_N[3]);
rLHS(15,18)+=crLHS10*(-crLHS24*crLHS873 + crLHS79*r_DN(3,2) + r_DN(3,2)*r_N[3]);
rLHS(15,19)+=-crLHS28*crLHS872;
rLHS(15,20)+=crLHS877;
rLHS(15,21)+=crLHS10*(crLHS878 + crLHS880 + crLHS97*r_DN(3,0));
rLHS(15,22)+=crLHS10*(crLHS881 + crLHS882 + crLHS97*r_DN(3,1));
rLHS(15,23)+=crLHS10*(crLHS883 + crLHS884 + crLHS97*r_DN(3,2));
rLHS(15,24)+=crLHS886;
rLHS(15,25)+=crLHS890;
rLHS(15,26)+=crLHS10*(crLHS115*r_DN(3,0) + crLHS891 + crLHS893);
rLHS(15,27)+=crLHS10*(crLHS115*r_DN(3,1) + crLHS894 + crLHS895);
rLHS(15,28)+=crLHS10*(crLHS115*r_DN(3,2) + crLHS896 + crLHS897);
rLHS(15,29)+=crLHS898;
rLHS(15,30)+=crLHS902;
rLHS(15,31)+=crLHS10*(crLHS133*r_DN(3,0) + crLHS903 + crLHS905);
rLHS(15,32)+=crLHS10*(crLHS133*r_DN(3,1) + crLHS906 + crLHS907);
rLHS(15,33)+=crLHS10*(crLHS133*r_DN(3,2) + crLHS908 + crLHS909);
rLHS(15,34)+=crLHS910;
rLHS(15,35)+=crLHS914;
rLHS(15,36)+=crLHS10*(crLHS151*r_DN(3,0) + crLHS915 + crLHS917);
rLHS(15,37)+=crLHS10*(crLHS151*r_DN(3,1) + crLHS918 + crLHS919);
rLHS(15,38)+=crLHS10*(crLHS151*r_DN(3,2) + crLHS920 + crLHS921);
rLHS(15,39)+=crLHS922;
rLHS(16,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[3]*tau_u - crLHS206*crLHS266 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,0)*tau_u - crLHS72 - crLHS923*r_DN(0,0));
rLHS(16,1)+=gauss_weight*(crLHS164*r_DN(3,0) + crLHS166*r_DN(3,1) + crLHS168*r_DN(3,2) + crLHS171*crLHS924 + crLHS930);
rLHS(16,2)+=gauss_weight*(crLHS181*r_DN(3,0) + crLHS183*r_DN(3,1) + crLHS186*r_DN(3,2) + crLHS189*crLHS924);
rLHS(16,3)+=gauss_weight*(crLHS190*r_DN(3,0) + crLHS192*r_DN(3,1) + crLHS194*r_DN(3,2) + crLHS197*crLHS924);
rLHS(16,4)+=-crLHS202*crLHS931;
rLHS(16,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[3]*tau_u - crLHS206*crLHS666 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,0)*tau_u - crLHS594 - crLHS923*r_DN(1,0));
rLHS(16,6)+=gauss_weight*(crLHS207*r_DN(3,0) + crLHS209*r_DN(3,1) + crLHS211*r_DN(3,2) + crLHS214*crLHS924 + crLHS932);
rLHS(16,7)+=gauss_weight*(crLHS219*r_DN(3,0) + crLHS221*r_DN(3,1) + crLHS224*r_DN(3,2) + crLHS226*crLHS924);
rLHS(16,8)+=gauss_weight*(crLHS227*r_DN(3,0) + crLHS229*r_DN(3,1) + crLHS231*r_DN(3,2) + crLHS233*crLHS924);
rLHS(16,9)+=-crLHS235*crLHS931;
rLHS(16,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[3]*tau_u - crLHS206*crLHS810 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,0)*tau_u - crLHS740 - crLHS923*r_DN(2,0));
rLHS(16,11)+=gauss_weight*(crLHS237*r_DN(3,0) + crLHS239*r_DN(3,1) + crLHS241*r_DN(3,2) + crLHS244*crLHS924 + crLHS933);
rLHS(16,12)+=gauss_weight*(crLHS249*r_DN(3,0) + crLHS251*r_DN(3,1) + crLHS254*r_DN(3,2) + crLHS256*crLHS924);
rLHS(16,13)+=gauss_weight*(crLHS257*r_DN(3,0) + crLHS259*r_DN(3,1) + crLHS261*r_DN(3,2) + crLHS263*crLHS924);
rLHS(16,14)+=-crLHS265*crLHS931;
rLHS(16,15)+=crLHS934*r_DN(3,0);
rLHS(16,16)+=gauss_weight*(crLHS267*r_DN(3,0) + crLHS269*r_DN(3,1) + crLHS271*r_DN(3,2) + crLHS274*crLHS924 + crLHS936);
rLHS(16,17)+=gauss_weight*(crLHS279*r_DN(3,0) + crLHS281*r_DN(3,1) + crLHS284*r_DN(3,2) + crLHS286*crLHS924);
rLHS(16,18)+=gauss_weight*(crLHS287*r_DN(3,0) + crLHS289*r_DN(3,1) + crLHS291*r_DN(3,2) + crLHS293*crLHS924);
rLHS(16,19)+=-crLHS295*crLHS931;
rLHS(16,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[3]*tau_u - crLHS206*crLHS878 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(4,0)*tau_u - crLHS923*r_DN(4,0) - crLHS937);
rLHS(16,21)+=gauss_weight*(crLHS297*r_DN(3,0) + crLHS299*r_DN(3,1) + crLHS301*r_DN(3,2) + crLHS304*crLHS924 + crLHS940);
rLHS(16,22)+=gauss_weight*(crLHS309*r_DN(3,0) + crLHS311*r_DN(3,1) + crLHS314*r_DN(3,2) + crLHS316*crLHS924);
rLHS(16,23)+=gauss_weight*(crLHS317*r_DN(3,0) + crLHS319*r_DN(3,1) + crLHS321*r_DN(3,2) + crLHS323*crLHS924);
rLHS(16,24)+=-crLHS325*crLHS931;
rLHS(16,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[3]*tau_u - crLHS206*crLHS891 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(5,0)*tau_u - crLHS923*r_DN(5,0) - crLHS941);
rLHS(16,26)+=gauss_weight*(crLHS327*r_DN(3,0) + crLHS329*r_DN(3,1) + crLHS331*r_DN(3,2) + crLHS334*crLHS924 + crLHS944);
rLHS(16,27)+=gauss_weight*(crLHS339*r_DN(3,0) + crLHS341*r_DN(3,1) + crLHS344*r_DN(3,2) + crLHS346*crLHS924);
rLHS(16,28)+=gauss_weight*(crLHS347*r_DN(3,0) + crLHS349*r_DN(3,1) + crLHS351*r_DN(3,2) + crLHS353*crLHS924);
rLHS(16,29)+=-crLHS355*crLHS931;
rLHS(16,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[3]*tau_u - crLHS206*crLHS903 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(6,0)*tau_u - crLHS923*r_DN(6,0) - crLHS945);
rLHS(16,31)+=gauss_weight*(crLHS357*r_DN(3,0) + crLHS359*r_DN(3,1) + crLHS361*r_DN(3,2) + crLHS364*crLHS924 + crLHS948);
rLHS(16,32)+=gauss_weight*(crLHS369*r_DN(3,0) + crLHS371*r_DN(3,1) + crLHS374*r_DN(3,2) + crLHS376*crLHS924);
rLHS(16,33)+=gauss_weight*(crLHS377*r_DN(3,0) + crLHS379*r_DN(3,1) + crLHS381*r_DN(3,2) + crLHS383*crLHS924);
rLHS(16,34)+=-crLHS385*crLHS931;
rLHS(16,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[3]*tau_u - crLHS206*crLHS915 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(7,0)*tau_u - crLHS923*r_DN(7,0) - crLHS949);
rLHS(16,36)+=gauss_weight*(crLHS387*r_DN(3,0) + crLHS389*r_DN(3,1) + crLHS391*r_DN(3,2) + crLHS393*crLHS924 + crLHS952);
rLHS(16,37)+=gauss_weight*(crLHS398*r_DN(3,0) + crLHS400*r_DN(3,1) + crLHS403*r_DN(3,2) + crLHS404*crLHS924);
rLHS(16,38)+=gauss_weight*(crLHS405*r_DN(3,0) + crLHS407*r_DN(3,1) + crLHS409*r_DN(3,2) + crLHS410*crLHS924);
rLHS(16,39)+=-crLHS412*crLHS931;
rLHS(17,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[3]*tau_u - crLHS206*crLHS441 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,1)*tau_u - crLHS80 - crLHS923*r_DN(0,1));
rLHS(17,1)+=gauss_weight*(crLHS166*r_DN(3,0) + crLHS171*crLHS953 + crLHS413*r_DN(3,1) + crLHS414*r_DN(3,2));
rLHS(17,2)+=gauss_weight*(crLHS183*r_DN(3,0) + crLHS189*crLHS953 + crLHS416*r_DN(3,1) + crLHS418*r_DN(3,2) + crLHS930);
rLHS(17,3)+=gauss_weight*(crLHS192*r_DN(3,0) + crLHS197*crLHS953 + crLHS419*r_DN(3,1) + crLHS421*r_DN(3,2));
rLHS(17,4)+=-crLHS202*crLHS954;
rLHS(17,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[3]*tau_u - crLHS206*crLHS689 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,1)*tau_u - crLHS597 - crLHS923*r_DN(1,1));
rLHS(17,6)+=gauss_weight*(crLHS209*r_DN(3,0) + crLHS214*crLHS953 + crLHS424*r_DN(3,1) + crLHS425*r_DN(3,2));
rLHS(17,7)+=gauss_weight*(crLHS221*r_DN(3,0) + crLHS226*crLHS953 + crLHS426*r_DN(3,1) + crLHS428*r_DN(3,2) + crLHS932);
rLHS(17,8)+=gauss_weight*(crLHS229*r_DN(3,0) + crLHS233*crLHS953 + crLHS429*r_DN(3,1) + crLHS431*r_DN(3,2));
rLHS(17,9)+=-crLHS235*crLHS954;
rLHS(17,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[3]*tau_u - crLHS206*crLHS832 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,1)*tau_u - crLHS743 - crLHS923*r_DN(2,1));
rLHS(17,11)+=gauss_weight*(crLHS239*r_DN(3,0) + crLHS244*crLHS953 + crLHS433*r_DN(3,1) + crLHS434*r_DN(3,2));
rLHS(17,12)+=gauss_weight*(crLHS251*r_DN(3,0) + crLHS256*crLHS953 + crLHS435*r_DN(3,1) + crLHS437*r_DN(3,2) + crLHS933);
rLHS(17,13)+=gauss_weight*(crLHS259*r_DN(3,0) + crLHS263*crLHS953 + crLHS438*r_DN(3,1) + crLHS440*r_DN(3,2));
rLHS(17,14)+=-crLHS265*crLHS954;
rLHS(17,15)+=crLHS934*r_DN(3,1);
rLHS(17,16)+=gauss_weight*(crLHS269*r_DN(3,0) + crLHS274*crLHS953 + crLHS442*r_DN(3,1) + crLHS443*r_DN(3,2));
rLHS(17,17)+=gauss_weight*(crLHS281*r_DN(3,0) + crLHS286*crLHS953 + crLHS444*r_DN(3,1) + crLHS446*r_DN(3,2) + crLHS936);
rLHS(17,18)+=gauss_weight*(crLHS289*r_DN(3,0) + crLHS293*crLHS953 + crLHS447*r_DN(3,1) + crLHS449*r_DN(3,2));
rLHS(17,19)+=-crLHS295*crLHS954;
rLHS(17,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[3]*tau_u - crLHS206*crLHS881 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(4,1)*tau_u - crLHS923*r_DN(4,1) - crLHS955);
rLHS(17,21)+=gauss_weight*(crLHS299*r_DN(3,0) + crLHS304*crLHS953 + crLHS451*r_DN(3,1) + crLHS452*r_DN(3,2));
rLHS(17,22)+=gauss_weight*(crLHS311*r_DN(3,0) + crLHS316*crLHS953 + crLHS453*r_DN(3,1) + crLHS455*r_DN(3,2) + crLHS940);
rLHS(17,23)+=gauss_weight*(crLHS319*r_DN(3,0) + crLHS323*crLHS953 + crLHS456*r_DN(3,1) + crLHS458*r_DN(3,2));
rLHS(17,24)+=-crLHS325*crLHS954;
rLHS(17,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[3]*tau_u - crLHS206*crLHS894 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(5,1)*tau_u - crLHS923*r_DN(5,1) - crLHS956);
rLHS(17,26)+=gauss_weight*(crLHS329*r_DN(3,0) + crLHS334*crLHS953 + crLHS460*r_DN(3,1) + crLHS461*r_DN(3,2));
rLHS(17,27)+=gauss_weight*(crLHS341*r_DN(3,0) + crLHS346*crLHS953 + crLHS462*r_DN(3,1) + crLHS464*r_DN(3,2) + crLHS944);
rLHS(17,28)+=gauss_weight*(crLHS349*r_DN(3,0) + crLHS353*crLHS953 + crLHS465*r_DN(3,1) + crLHS467*r_DN(3,2));
rLHS(17,29)+=-crLHS355*crLHS954;
rLHS(17,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[3]*tau_u - crLHS206*crLHS906 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(6,1)*tau_u - crLHS923*r_DN(6,1) - crLHS957);
rLHS(17,31)+=gauss_weight*(crLHS359*r_DN(3,0) + crLHS364*crLHS953 + crLHS469*r_DN(3,1) + crLHS470*r_DN(3,2));
rLHS(17,32)+=gauss_weight*(crLHS371*r_DN(3,0) + crLHS376*crLHS953 + crLHS471*r_DN(3,1) + crLHS473*r_DN(3,2) + crLHS948);
rLHS(17,33)+=gauss_weight*(crLHS379*r_DN(3,0) + crLHS383*crLHS953 + crLHS474*r_DN(3,1) + crLHS476*r_DN(3,2));
rLHS(17,34)+=-crLHS385*crLHS954;
rLHS(17,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[3]*tau_u - crLHS206*crLHS918 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(7,1)*tau_u - crLHS923*r_DN(7,1) - crLHS958);
rLHS(17,36)+=gauss_weight*(crLHS389*r_DN(3,0) + crLHS393*crLHS953 + crLHS478*r_DN(3,1) + crLHS479*r_DN(3,2));
rLHS(17,37)+=gauss_weight*(crLHS400*r_DN(3,0) + crLHS404*crLHS953 + crLHS480*r_DN(3,1) + crLHS482*r_DN(3,2) + crLHS952);
rLHS(17,38)+=gauss_weight*(crLHS407*r_DN(3,0) + crLHS410*crLHS953 + crLHS483*r_DN(3,1) + crLHS485*r_DN(3,2));
rLHS(17,39)+=-crLHS412*crLHS954;
rLHS(18,0)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[3]*tau_u - crLHS206*crLHS499 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(0,2)*tau_u - crLHS82 - crLHS923*r_DN(0,2));
rLHS(18,1)+=gauss_weight*(crLHS168*r_DN(3,0) + crLHS171*crLHS959 + crLHS414*r_DN(3,1) + crLHS486*r_DN(3,2));
rLHS(18,2)+=gauss_weight*(crLHS186*r_DN(3,0) + crLHS189*crLHS959 + crLHS418*r_DN(3,1) + crLHS488*r_DN(3,2));
rLHS(18,3)+=gauss_weight*(crLHS194*r_DN(3,0) + crLHS197*crLHS959 + crLHS421*r_DN(3,1) + crLHS489*r_DN(3,2) + crLHS930);
rLHS(18,4)+=-crLHS202*crLHS960;
rLHS(18,5)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[3]*tau_u - crLHS206*crLHS697 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(1,2)*tau_u - crLHS599 - crLHS923*r_DN(1,2));
rLHS(18,6)+=gauss_weight*(crLHS211*r_DN(3,0) + crLHS214*crLHS959 + crLHS425*r_DN(3,1) + crLHS492*r_DN(3,2));
rLHS(18,7)+=gauss_weight*(crLHS224*r_DN(3,0) + crLHS226*crLHS959 + crLHS428*r_DN(3,1) + crLHS493*r_DN(3,2));
rLHS(18,8)+=gauss_weight*(crLHS231*r_DN(3,0) + crLHS233*crLHS959 + crLHS431*r_DN(3,1) + crLHS494*r_DN(3,2) + crLHS932);
rLHS(18,9)+=-crLHS235*crLHS960;
rLHS(18,10)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[3]*tau_u - crLHS206*crLHS839 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(2,2)*tau_u - crLHS745 - crLHS923*r_DN(2,2));
rLHS(18,11)+=gauss_weight*(crLHS241*r_DN(3,0) + crLHS244*crLHS959 + crLHS434*r_DN(3,1) + crLHS496*r_DN(3,2));
rLHS(18,12)+=gauss_weight*(crLHS254*r_DN(3,0) + crLHS256*crLHS959 + crLHS437*r_DN(3,1) + crLHS497*r_DN(3,2));
rLHS(18,13)+=gauss_weight*(crLHS261*r_DN(3,0) + crLHS263*crLHS959 + crLHS440*r_DN(3,1) + crLHS498*r_DN(3,2) + crLHS933);
rLHS(18,14)+=-crLHS265*crLHS960;
rLHS(18,15)+=crLHS934*r_DN(3,2);
rLHS(18,16)+=gauss_weight*(crLHS271*r_DN(3,0) + crLHS274*crLHS959 + crLHS443*r_DN(3,1) + crLHS500*r_DN(3,2));
rLHS(18,17)+=gauss_weight*(crLHS284*r_DN(3,0) + crLHS286*crLHS959 + crLHS446*r_DN(3,1) + crLHS501*r_DN(3,2));
rLHS(18,18)+=gauss_weight*(crLHS291*r_DN(3,0) + crLHS293*crLHS959 + crLHS449*r_DN(3,1) + crLHS502*r_DN(3,2) + crLHS936);
rLHS(18,19)+=-crLHS295*crLHS960;
rLHS(18,20)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[3]*tau_u - crLHS206*crLHS883 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(4,2)*tau_u - crLHS923*r_DN(4,2) - crLHS961);
rLHS(18,21)+=gauss_weight*(crLHS301*r_DN(3,0) + crLHS304*crLHS959 + crLHS452*r_DN(3,1) + crLHS504*r_DN(3,2));
rLHS(18,22)+=gauss_weight*(crLHS314*r_DN(3,0) + crLHS316*crLHS959 + crLHS455*r_DN(3,1) + crLHS505*r_DN(3,2));
rLHS(18,23)+=gauss_weight*(crLHS321*r_DN(3,0) + crLHS323*crLHS959 + crLHS458*r_DN(3,1) + crLHS506*r_DN(3,2) + crLHS940);
rLHS(18,24)+=-crLHS325*crLHS960;
rLHS(18,25)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[3]*tau_u - crLHS206*crLHS896 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(5,2)*tau_u - crLHS923*r_DN(5,2) - crLHS962);
rLHS(18,26)+=gauss_weight*(crLHS331*r_DN(3,0) + crLHS334*crLHS959 + crLHS461*r_DN(3,1) + crLHS508*r_DN(3,2));
rLHS(18,27)+=gauss_weight*(crLHS344*r_DN(3,0) + crLHS346*crLHS959 + crLHS464*r_DN(3,1) + crLHS509*r_DN(3,2));
rLHS(18,28)+=gauss_weight*(crLHS351*r_DN(3,0) + crLHS353*crLHS959 + crLHS467*r_DN(3,1) + crLHS510*r_DN(3,2) + crLHS944);
rLHS(18,29)+=-crLHS355*crLHS960;
rLHS(18,30)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[3]*tau_u - crLHS206*crLHS908 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(6,2)*tau_u - crLHS923*r_DN(6,2) - crLHS963);
rLHS(18,31)+=gauss_weight*(crLHS361*r_DN(3,0) + crLHS364*crLHS959 + crLHS470*r_DN(3,1) + crLHS512*r_DN(3,2));
rLHS(18,32)+=gauss_weight*(crLHS374*r_DN(3,0) + crLHS376*crLHS959 + crLHS473*r_DN(3,1) + crLHS513*r_DN(3,2));
rLHS(18,33)+=gauss_weight*(crLHS381*r_DN(3,0) + crLHS383*crLHS959 + crLHS476*r_DN(3,1) + crLHS514*r_DN(3,2) + crLHS948);
rLHS(18,34)+=-crLHS385*crLHS960;
rLHS(18,35)+=gauss_weight*(crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[3]*tau_u - crLHS206*crLHS920 + crLHS3*crLHS6*crLHS7*crLHS77*gamma*p_th*r_DN(7,2)*tau_u - crLHS923*r_DN(7,2) - crLHS964);
rLHS(18,36)+=gauss_weight*(crLHS391*r_DN(3,0) + crLHS393*crLHS959 + crLHS479*r_DN(3,1) + crLHS516*r_DN(3,2));
rLHS(18,37)+=gauss_weight*(crLHS403*r_DN(3,0) + crLHS404*crLHS959 + crLHS482*r_DN(3,1) + crLHS517*r_DN(3,2));
rLHS(18,38)+=gauss_weight*(crLHS409*r_DN(3,0) + crLHS410*crLHS959 + crLHS485*r_DN(3,1) + crLHS518*r_DN(3,2) + crLHS952);
rLHS(18,39)+=-crLHS412*crLHS960;
rLHS(19,0)+=0;
rLHS(19,1)+=crLHS542;
rLHS(19,2)+=crLHS543;
rLHS(19,3)+=crLHS544;
rLHS(19,4)+=gauss_weight*(crLHS201*crLHS275 - crLHS521*crLHS965 - crLHS521*crLHS966 + crLHS521*crLHS967 - crLHS521*crLHS968 + crLHS547);
rLHS(19,5)+=0;
rLHS(19,6)+=crLHS711;
rLHS(19,7)+=crLHS712;
rLHS(19,8)+=crLHS713;
rLHS(19,9)+=gauss_weight*(crLHS234*crLHS275 - crLHS534*crLHS965 - crLHS534*crLHS966 + crLHS534*crLHS967 - crLHS534*crLHS968 + crLHS714);
rLHS(19,10)+=0;
rLHS(19,11)+=crLHS849;
rLHS(19,12)+=crLHS850;
rLHS(19,13)+=crLHS851;
rLHS(19,14)+=gauss_weight*(crLHS264*crLHS275 - crLHS540*crLHS965 - crLHS540*crLHS966 + crLHS540*crLHS967 - crLHS540*crLHS968 + crLHS852);
rLHS(19,15)+=0;
rLHS(19,16)+=crLHS169*crLHS969;
rLHS(19,17)+=crLHS187*crLHS969;
rLHS(19,18)+=crLHS195*crLHS969;
rLHS(19,19)+=gauss_weight*(crLHS275*crLHS294 - crLHS546*crLHS965 - crLHS546*crLHS966 + crLHS546*crLHS967 - crLHS546*crLHS968 + crLHS869*kappa + crLHS870*kappa + crLHS871*kappa - crLHS873*dp_th_dt + crLHS935);
rLHS(19,20)+=0;
rLHS(19,21)+=crLHS970;
rLHS(19,22)+=crLHS971;
rLHS(19,23)+=crLHS972;
rLHS(19,24)+=gauss_weight*(crLHS275*crLHS324 - crLHS552*crLHS965 - crLHS552*crLHS966 + crLHS552*crLHS967 - crLHS552*crLHS968 + crLHS973);
rLHS(19,25)+=0;
rLHS(19,26)+=crLHS974;
rLHS(19,27)+=crLHS975;
rLHS(19,28)+=crLHS976;
rLHS(19,29)+=gauss_weight*(crLHS275*crLHS354 - crLHS558*crLHS965 - crLHS558*crLHS966 + crLHS558*crLHS967 - crLHS558*crLHS968 + crLHS977);
rLHS(19,30)+=0;
rLHS(19,31)+=crLHS978;
rLHS(19,32)+=crLHS979;
rLHS(19,33)+=crLHS980;
rLHS(19,34)+=gauss_weight*(crLHS275*crLHS384 - crLHS564*crLHS965 - crLHS564*crLHS966 + crLHS564*crLHS967 - crLHS564*crLHS968 + crLHS981);
rLHS(19,35)+=0;
rLHS(19,36)+=crLHS982;
rLHS(19,37)+=crLHS983;
rLHS(19,38)+=crLHS984;
rLHS(19,39)+=gauss_weight*(crLHS275*crLHS411 - crLHS570*crLHS965 - crLHS570*crLHS966 + crLHS570*crLHS967 - crLHS570*crLHS968 + crLHS985);
rLHS(20,0)+=crLHS89;
rLHS(20,1)+=crLHS10*(crLHS22*r_DN(4,0) + crLHS296 + crLHS92);
rLHS(20,2)+=crLHS10*(crLHS22*r_DN(4,1) + crLHS450 + crLHS99);
rLHS(20,3)+=crLHS10*(crLHS101 + crLHS22*r_DN(4,2) + crLHS503);
rLHS(20,4)+=crLHS103;
rLHS(20,5)+=crLHS605;
rLHS(20,6)+=crLHS10*(crLHS41*r_DN(4,0) + crLHS608 + crLHS670);
rLHS(20,7)+=crLHS10*(crLHS41*r_DN(4,1) + crLHS610 + crLHS690);
rLHS(20,8)+=crLHS10*(crLHS41*r_DN(4,2) + crLHS612 + crLHS698);
rLHS(20,9)+=crLHS613;
rLHS(20,10)+=crLHS752;
rLHS(20,11)+=crLHS10*(crLHS61*r_DN(4,0) + crLHS755 + crLHS814);
rLHS(20,12)+=crLHS10*(crLHS61*r_DN(4,1) + crLHS757 + crLHS833);
rLHS(20,13)+=crLHS10*(crLHS61*r_DN(4,2) + crLHS759 + crLHS840);
rLHS(20,14)+=crLHS760;
rLHS(20,15)+=crLHS877;
rLHS(20,16)+=crLHS10*(crLHS79*r_DN(4,0) + crLHS880 + crLHS937);
rLHS(20,17)+=crLHS10*(crLHS79*r_DN(4,1) + crLHS882 + crLHS955);
rLHS(20,18)+=crLHS10*(crLHS79*r_DN(4,2) + crLHS884 + crLHS961);
rLHS(20,19)+=crLHS886;
rLHS(20,20)+=crLHS11*(crLHS986 + crLHS987 + crLHS988);
rLHS(20,21)+=crLHS10*(-crLHS12*crLHS990 + crLHS97*r_DN(4,0) + r_DN(4,0)*r_N[4]);
rLHS(20,22)+=crLHS10*(-crLHS23*crLHS990 + crLHS97*r_DN(4,1) + r_DN(4,1)*r_N[4]);
rLHS(20,23)+=crLHS10*(-crLHS24*crLHS990 + crLHS97*r_DN(4,2) + r_DN(4,2)*r_N[4]);
rLHS(20,24)+=-crLHS28*crLHS989;
rLHS(20,25)+=crLHS994;
rLHS(20,26)+=crLHS10*(crLHS115*r_DN(4,0) + crLHS995 + crLHS997);
rLHS(20,27)+=crLHS10*(crLHS115*r_DN(4,1) + crLHS998 + crLHS999);
rLHS(20,28)+=crLHS10*(crLHS1000 + crLHS1001 + crLHS115*r_DN(4,2));
rLHS(20,29)+=crLHS1003;
rLHS(20,30)+=crLHS1007;
rLHS(20,31)+=crLHS10*(crLHS1008 + crLHS1010 + crLHS133*r_DN(4,0));
rLHS(20,32)+=crLHS10*(crLHS1011 + crLHS1012 + crLHS133*r_DN(4,1));
rLHS(20,33)+=crLHS10*(crLHS1013 + crLHS1014 + crLHS133*r_DN(4,2));
rLHS(20,34)+=crLHS1015;
rLHS(20,35)+=crLHS1019;
rLHS(20,36)+=crLHS10*(crLHS1020 + crLHS1022 + crLHS151*r_DN(4,0));
rLHS(20,37)+=crLHS10*(crLHS1023 + crLHS1024 + crLHS151*r_DN(4,1));
rLHS(20,38)+=crLHS10*(crLHS1025 + crLHS1026 + crLHS151*r_DN(4,2));
rLHS(20,39)+=crLHS1027;
rLHS(21,0)+=gauss_weight*(-crLHS1028*r_DN(0,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[4]*tau_u - crLHS206*crLHS296 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(0,0)*tau_u - crLHS90);
rLHS(21,1)+=gauss_weight*(crLHS1029*crLHS171 + crLHS1035 + crLHS164*r_DN(4,0) + crLHS166*r_DN(4,1) + crLHS168*r_DN(4,2));
rLHS(21,2)+=gauss_weight*(crLHS1029*crLHS189 + crLHS181*r_DN(4,0) + crLHS183*r_DN(4,1) + crLHS186*r_DN(4,2));
rLHS(21,3)+=gauss_weight*(crLHS1029*crLHS197 + crLHS190*r_DN(4,0) + crLHS192*r_DN(4,1) + crLHS194*r_DN(4,2));
rLHS(21,4)+=-crLHS1036*crLHS202;
rLHS(21,5)+=gauss_weight*(-crLHS1028*r_DN(1,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[4]*tau_u - crLHS206*crLHS670 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(1,0)*tau_u - crLHS606);
rLHS(21,6)+=gauss_weight*(crLHS1029*crLHS214 + crLHS1037 + crLHS207*r_DN(4,0) + crLHS209*r_DN(4,1) + crLHS211*r_DN(4,2));
rLHS(21,7)+=gauss_weight*(crLHS1029*crLHS226 + crLHS219*r_DN(4,0) + crLHS221*r_DN(4,1) + crLHS224*r_DN(4,2));
rLHS(21,8)+=gauss_weight*(crLHS1029*crLHS233 + crLHS227*r_DN(4,0) + crLHS229*r_DN(4,1) + crLHS231*r_DN(4,2));
rLHS(21,9)+=-crLHS1036*crLHS235;
rLHS(21,10)+=gauss_weight*(-crLHS1028*r_DN(2,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[4]*tau_u - crLHS206*crLHS814 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(2,0)*tau_u - crLHS753);
rLHS(21,11)+=gauss_weight*(crLHS1029*crLHS244 + crLHS1038 + crLHS237*r_DN(4,0) + crLHS239*r_DN(4,1) + crLHS241*r_DN(4,2));
rLHS(21,12)+=gauss_weight*(crLHS1029*crLHS256 + crLHS249*r_DN(4,0) + crLHS251*r_DN(4,1) + crLHS254*r_DN(4,2));
rLHS(21,13)+=gauss_weight*(crLHS1029*crLHS263 + crLHS257*r_DN(4,0) + crLHS259*r_DN(4,1) + crLHS261*r_DN(4,2));
rLHS(21,14)+=-crLHS1036*crLHS265;
rLHS(21,15)+=gauss_weight*(-crLHS1028*r_DN(3,0) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[4]*tau_u - crLHS206*crLHS937 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(3,0)*tau_u - crLHS878);
rLHS(21,16)+=gauss_weight*(crLHS1029*crLHS274 + crLHS1039 + crLHS267*r_DN(4,0) + crLHS269*r_DN(4,1) + crLHS271*r_DN(4,2));
rLHS(21,17)+=gauss_weight*(crLHS1029*crLHS286 + crLHS279*r_DN(4,0) + crLHS281*r_DN(4,1) + crLHS284*r_DN(4,2));
rLHS(21,18)+=gauss_weight*(crLHS1029*crLHS293 + crLHS287*r_DN(4,0) + crLHS289*r_DN(4,1) + crLHS291*r_DN(4,2));
rLHS(21,19)+=-crLHS1036*crLHS295;
rLHS(21,20)+=crLHS1040*r_DN(4,0);
rLHS(21,21)+=gauss_weight*(crLHS1029*crLHS304 + crLHS1042 + crLHS297*r_DN(4,0) + crLHS299*r_DN(4,1) + crLHS301*r_DN(4,2));
rLHS(21,22)+=gauss_weight*(crLHS1029*crLHS316 + crLHS309*r_DN(4,0) + crLHS311*r_DN(4,1) + crLHS314*r_DN(4,2));
rLHS(21,23)+=gauss_weight*(crLHS1029*crLHS323 + crLHS317*r_DN(4,0) + crLHS319*r_DN(4,1) + crLHS321*r_DN(4,2));
rLHS(21,24)+=-crLHS1036*crLHS325;
rLHS(21,25)+=gauss_weight*(-crLHS1028*r_DN(5,0) - crLHS1043 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[4]*tau_u - crLHS206*crLHS995 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(5,0)*tau_u);
rLHS(21,26)+=gauss_weight*(crLHS1029*crLHS334 + crLHS1046 + crLHS327*r_DN(4,0) + crLHS329*r_DN(4,1) + crLHS331*r_DN(4,2));
rLHS(21,27)+=gauss_weight*(crLHS1029*crLHS346 + crLHS339*r_DN(4,0) + crLHS341*r_DN(4,1) + crLHS344*r_DN(4,2));
rLHS(21,28)+=gauss_weight*(crLHS1029*crLHS353 + crLHS347*r_DN(4,0) + crLHS349*r_DN(4,1) + crLHS351*r_DN(4,2));
rLHS(21,29)+=-crLHS1036*crLHS355;
rLHS(21,30)+=gauss_weight*(-crLHS1008*crLHS206 - crLHS1028*r_DN(6,0) - crLHS1047 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(6,0)*tau_u);
rLHS(21,31)+=gauss_weight*(crLHS1029*crLHS364 + crLHS1050 + crLHS357*r_DN(4,0) + crLHS359*r_DN(4,1) + crLHS361*r_DN(4,2));
rLHS(21,32)+=gauss_weight*(crLHS1029*crLHS376 + crLHS369*r_DN(4,0) + crLHS371*r_DN(4,1) + crLHS374*r_DN(4,2));
rLHS(21,33)+=gauss_weight*(crLHS1029*crLHS383 + crLHS377*r_DN(4,0) + crLHS379*r_DN(4,1) + crLHS381*r_DN(4,2));
rLHS(21,34)+=-crLHS1036*crLHS385;
rLHS(21,35)+=gauss_weight*(-crLHS1020*crLHS206 - crLHS1028*r_DN(7,0) - crLHS1051 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(7,0)*tau_u);
rLHS(21,36)+=gauss_weight*(crLHS1029*crLHS393 + crLHS1054 + crLHS387*r_DN(4,0) + crLHS389*r_DN(4,1) + crLHS391*r_DN(4,2));
rLHS(21,37)+=gauss_weight*(crLHS1029*crLHS404 + crLHS398*r_DN(4,0) + crLHS400*r_DN(4,1) + crLHS403*r_DN(4,2));
rLHS(21,38)+=gauss_weight*(crLHS1029*crLHS410 + crLHS405*r_DN(4,0) + crLHS407*r_DN(4,1) + crLHS409*r_DN(4,2));
rLHS(21,39)+=-crLHS1036*crLHS412;
rLHS(22,0)+=gauss_weight*(-crLHS1028*r_DN(0,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[4]*tau_u - crLHS206*crLHS450 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(0,1)*tau_u - crLHS98);
rLHS(22,1)+=gauss_weight*(crLHS1055*crLHS171 + crLHS166*r_DN(4,0) + crLHS413*r_DN(4,1) + crLHS414*r_DN(4,2));
rLHS(22,2)+=gauss_weight*(crLHS1035 + crLHS1055*crLHS189 + crLHS183*r_DN(4,0) + crLHS416*r_DN(4,1) + crLHS418*r_DN(4,2));
rLHS(22,3)+=gauss_weight*(crLHS1055*crLHS197 + crLHS192*r_DN(4,0) + crLHS419*r_DN(4,1) + crLHS421*r_DN(4,2));
rLHS(22,4)+=-crLHS1056*crLHS202;
rLHS(22,5)+=gauss_weight*(-crLHS1028*r_DN(1,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[4]*tau_u - crLHS206*crLHS690 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(1,1)*tau_u - crLHS609);
rLHS(22,6)+=gauss_weight*(crLHS1055*crLHS214 + crLHS209*r_DN(4,0) + crLHS424*r_DN(4,1) + crLHS425*r_DN(4,2));
rLHS(22,7)+=gauss_weight*(crLHS1037 + crLHS1055*crLHS226 + crLHS221*r_DN(4,0) + crLHS426*r_DN(4,1) + crLHS428*r_DN(4,2));
rLHS(22,8)+=gauss_weight*(crLHS1055*crLHS233 + crLHS229*r_DN(4,0) + crLHS429*r_DN(4,1) + crLHS431*r_DN(4,2));
rLHS(22,9)+=-crLHS1056*crLHS235;
rLHS(22,10)+=gauss_weight*(-crLHS1028*r_DN(2,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[4]*tau_u - crLHS206*crLHS833 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(2,1)*tau_u - crLHS756);
rLHS(22,11)+=gauss_weight*(crLHS1055*crLHS244 + crLHS239*r_DN(4,0) + crLHS433*r_DN(4,1) + crLHS434*r_DN(4,2));
rLHS(22,12)+=gauss_weight*(crLHS1038 + crLHS1055*crLHS256 + crLHS251*r_DN(4,0) + crLHS435*r_DN(4,1) + crLHS437*r_DN(4,2));
rLHS(22,13)+=gauss_weight*(crLHS1055*crLHS263 + crLHS259*r_DN(4,0) + crLHS438*r_DN(4,1) + crLHS440*r_DN(4,2));
rLHS(22,14)+=-crLHS1056*crLHS265;
rLHS(22,15)+=gauss_weight*(-crLHS1028*r_DN(3,1) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[4]*tau_u - crLHS206*crLHS955 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(3,1)*tau_u - crLHS881);
rLHS(22,16)+=gauss_weight*(crLHS1055*crLHS274 + crLHS269*r_DN(4,0) + crLHS442*r_DN(4,1) + crLHS443*r_DN(4,2));
rLHS(22,17)+=gauss_weight*(crLHS1039 + crLHS1055*crLHS286 + crLHS281*r_DN(4,0) + crLHS444*r_DN(4,1) + crLHS446*r_DN(4,2));
rLHS(22,18)+=gauss_weight*(crLHS1055*crLHS293 + crLHS289*r_DN(4,0) + crLHS447*r_DN(4,1) + crLHS449*r_DN(4,2));
rLHS(22,19)+=-crLHS1056*crLHS295;
rLHS(22,20)+=crLHS1040*r_DN(4,1);
rLHS(22,21)+=gauss_weight*(crLHS1055*crLHS304 + crLHS299*r_DN(4,0) + crLHS451*r_DN(4,1) + crLHS452*r_DN(4,2));
rLHS(22,22)+=gauss_weight*(crLHS1042 + crLHS1055*crLHS316 + crLHS311*r_DN(4,0) + crLHS453*r_DN(4,1) + crLHS455*r_DN(4,2));
rLHS(22,23)+=gauss_weight*(crLHS1055*crLHS323 + crLHS319*r_DN(4,0) + crLHS456*r_DN(4,1) + crLHS458*r_DN(4,2));
rLHS(22,24)+=-crLHS1056*crLHS325;
rLHS(22,25)+=gauss_weight*(-crLHS1028*r_DN(5,1) - crLHS1057 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[4]*tau_u - crLHS206*crLHS998 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(5,1)*tau_u);
rLHS(22,26)+=gauss_weight*(crLHS1055*crLHS334 + crLHS329*r_DN(4,0) + crLHS460*r_DN(4,1) + crLHS461*r_DN(4,2));
rLHS(22,27)+=gauss_weight*(crLHS1046 + crLHS1055*crLHS346 + crLHS341*r_DN(4,0) + crLHS462*r_DN(4,1) + crLHS464*r_DN(4,2));
rLHS(22,28)+=gauss_weight*(crLHS1055*crLHS353 + crLHS349*r_DN(4,0) + crLHS465*r_DN(4,1) + crLHS467*r_DN(4,2));
rLHS(22,29)+=-crLHS1056*crLHS355;
rLHS(22,30)+=gauss_weight*(-crLHS1011*crLHS206 - crLHS1028*r_DN(6,1) - crLHS1058 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(6,1)*tau_u);
rLHS(22,31)+=gauss_weight*(crLHS1055*crLHS364 + crLHS359*r_DN(4,0) + crLHS469*r_DN(4,1) + crLHS470*r_DN(4,2));
rLHS(22,32)+=gauss_weight*(crLHS1050 + crLHS1055*crLHS376 + crLHS371*r_DN(4,0) + crLHS471*r_DN(4,1) + crLHS473*r_DN(4,2));
rLHS(22,33)+=gauss_weight*(crLHS1055*crLHS383 + crLHS379*r_DN(4,0) + crLHS474*r_DN(4,1) + crLHS476*r_DN(4,2));
rLHS(22,34)+=-crLHS1056*crLHS385;
rLHS(22,35)+=gauss_weight*(-crLHS1023*crLHS206 - crLHS1028*r_DN(7,1) - crLHS1059 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(7,1)*tau_u);
rLHS(22,36)+=gauss_weight*(crLHS1055*crLHS393 + crLHS389*r_DN(4,0) + crLHS478*r_DN(4,1) + crLHS479*r_DN(4,2));
rLHS(22,37)+=gauss_weight*(crLHS1054 + crLHS1055*crLHS404 + crLHS400*r_DN(4,0) + crLHS480*r_DN(4,1) + crLHS482*r_DN(4,2));
rLHS(22,38)+=gauss_weight*(crLHS1055*crLHS410 + crLHS407*r_DN(4,0) + crLHS483*r_DN(4,1) + crLHS485*r_DN(4,2));
rLHS(22,39)+=-crLHS1056*crLHS412;
rLHS(23,0)+=gauss_weight*(-crLHS100 - crLHS1028*r_DN(0,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[4]*tau_u - crLHS206*crLHS503 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(0,2)*tau_u);
rLHS(23,1)+=gauss_weight*(crLHS1060*crLHS171 + crLHS168*r_DN(4,0) + crLHS414*r_DN(4,1) + crLHS486*r_DN(4,2));
rLHS(23,2)+=gauss_weight*(crLHS1060*crLHS189 + crLHS186*r_DN(4,0) + crLHS418*r_DN(4,1) + crLHS488*r_DN(4,2));
rLHS(23,3)+=gauss_weight*(crLHS1035 + crLHS1060*crLHS197 + crLHS194*r_DN(4,0) + crLHS421*r_DN(4,1) + crLHS489*r_DN(4,2));
rLHS(23,4)+=-crLHS1061*crLHS202;
rLHS(23,5)+=gauss_weight*(-crLHS1028*r_DN(1,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[4]*tau_u - crLHS206*crLHS698 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(1,2)*tau_u - crLHS611);
rLHS(23,6)+=gauss_weight*(crLHS1060*crLHS214 + crLHS211*r_DN(4,0) + crLHS425*r_DN(4,1) + crLHS492*r_DN(4,2));
rLHS(23,7)+=gauss_weight*(crLHS1060*crLHS226 + crLHS224*r_DN(4,0) + crLHS428*r_DN(4,1) + crLHS493*r_DN(4,2));
rLHS(23,8)+=gauss_weight*(crLHS1037 + crLHS1060*crLHS233 + crLHS231*r_DN(4,0) + crLHS431*r_DN(4,1) + crLHS494*r_DN(4,2));
rLHS(23,9)+=-crLHS1061*crLHS235;
rLHS(23,10)+=gauss_weight*(-crLHS1028*r_DN(2,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[4]*tau_u - crLHS206*crLHS840 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(2,2)*tau_u - crLHS758);
rLHS(23,11)+=gauss_weight*(crLHS1060*crLHS244 + crLHS241*r_DN(4,0) + crLHS434*r_DN(4,1) + crLHS496*r_DN(4,2));
rLHS(23,12)+=gauss_weight*(crLHS1060*crLHS256 + crLHS254*r_DN(4,0) + crLHS437*r_DN(4,1) + crLHS497*r_DN(4,2));
rLHS(23,13)+=gauss_weight*(crLHS1038 + crLHS1060*crLHS263 + crLHS261*r_DN(4,0) + crLHS440*r_DN(4,1) + crLHS498*r_DN(4,2));
rLHS(23,14)+=-crLHS1061*crLHS265;
rLHS(23,15)+=gauss_weight*(-crLHS1028*r_DN(3,2) + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[4]*tau_u - crLHS206*crLHS961 + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(3,2)*tau_u - crLHS883);
rLHS(23,16)+=gauss_weight*(crLHS1060*crLHS274 + crLHS271*r_DN(4,0) + crLHS443*r_DN(4,1) + crLHS500*r_DN(4,2));
rLHS(23,17)+=gauss_weight*(crLHS1060*crLHS286 + crLHS284*r_DN(4,0) + crLHS446*r_DN(4,1) + crLHS501*r_DN(4,2));
rLHS(23,18)+=gauss_weight*(crLHS1039 + crLHS1060*crLHS293 + crLHS291*r_DN(4,0) + crLHS449*r_DN(4,1) + crLHS502*r_DN(4,2));
rLHS(23,19)+=-crLHS1061*crLHS295;
rLHS(23,20)+=crLHS1040*r_DN(4,2);
rLHS(23,21)+=gauss_weight*(crLHS1060*crLHS304 + crLHS301*r_DN(4,0) + crLHS452*r_DN(4,1) + crLHS504*r_DN(4,2));
rLHS(23,22)+=gauss_weight*(crLHS1060*crLHS316 + crLHS314*r_DN(4,0) + crLHS455*r_DN(4,1) + crLHS505*r_DN(4,2));
rLHS(23,23)+=gauss_weight*(crLHS1042 + crLHS1060*crLHS323 + crLHS321*r_DN(4,0) + crLHS458*r_DN(4,1) + crLHS506*r_DN(4,2));
rLHS(23,24)+=-crLHS1061*crLHS325;
rLHS(23,25)+=gauss_weight*(-crLHS1000*crLHS206 - crLHS1028*r_DN(5,2) - crLHS1062 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(5,2)*tau_u);
rLHS(23,26)+=gauss_weight*(crLHS1060*crLHS334 + crLHS331*r_DN(4,0) + crLHS461*r_DN(4,1) + crLHS508*r_DN(4,2));
rLHS(23,27)+=gauss_weight*(crLHS1060*crLHS346 + crLHS344*r_DN(4,0) + crLHS464*r_DN(4,1) + crLHS509*r_DN(4,2));
rLHS(23,28)+=gauss_weight*(crLHS1046 + crLHS1060*crLHS353 + crLHS351*r_DN(4,0) + crLHS467*r_DN(4,1) + crLHS510*r_DN(4,2));
rLHS(23,29)+=-crLHS1061*crLHS355;
rLHS(23,30)+=gauss_weight*(-crLHS1013*crLHS206 - crLHS1028*r_DN(6,2) - crLHS1063 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(6,2)*tau_u);
rLHS(23,31)+=gauss_weight*(crLHS1060*crLHS364 + crLHS361*r_DN(4,0) + crLHS470*r_DN(4,1) + crLHS512*r_DN(4,2));
rLHS(23,32)+=gauss_weight*(crLHS1060*crLHS376 + crLHS374*r_DN(4,0) + crLHS473*r_DN(4,1) + crLHS513*r_DN(4,2));
rLHS(23,33)+=gauss_weight*(crLHS1050 + crLHS1060*crLHS383 + crLHS381*r_DN(4,0) + crLHS476*r_DN(4,1) + crLHS514*r_DN(4,2));
rLHS(23,34)+=-crLHS1061*crLHS385;
rLHS(23,35)+=gauss_weight*(-crLHS1025*crLHS206 - crLHS1028*r_DN(7,2) - crLHS1064 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[4]*tau_u + crLHS3*crLHS6*crLHS7*crLHS95*gamma*p_th*r_DN(7,2)*tau_u);
rLHS(23,36)+=gauss_weight*(crLHS1060*crLHS393 + crLHS391*r_DN(4,0) + crLHS479*r_DN(4,1) + crLHS516*r_DN(4,2));
rLHS(23,37)+=gauss_weight*(crLHS1060*crLHS404 + crLHS403*r_DN(4,0) + crLHS482*r_DN(4,1) + crLHS517*r_DN(4,2));
rLHS(23,38)+=gauss_weight*(crLHS1054 + crLHS1060*crLHS410 + crLHS409*r_DN(4,0) + crLHS485*r_DN(4,1) + crLHS518*r_DN(4,2));
rLHS(23,39)+=-crLHS1061*crLHS412;
rLHS(24,0)+=0;
rLHS(24,1)+=crLHS548;
rLHS(24,2)+=crLHS549;
rLHS(24,3)+=crLHS550;
rLHS(24,4)+=gauss_weight*(-crLHS1065*crLHS521 - crLHS1066*crLHS521 + crLHS1067*crLHS521 - crLHS1068*crLHS521 + crLHS201*crLHS305 + crLHS553);
rLHS(24,5)+=0;
rLHS(24,6)+=crLHS715;
rLHS(24,7)+=crLHS716;
rLHS(24,8)+=crLHS717;
rLHS(24,9)+=gauss_weight*(-crLHS1065*crLHS534 - crLHS1066*crLHS534 + crLHS1067*crLHS534 - crLHS1068*crLHS534 + crLHS234*crLHS305 + crLHS718);
rLHS(24,10)+=0;
rLHS(24,11)+=crLHS853;
rLHS(24,12)+=crLHS854;
rLHS(24,13)+=crLHS855;
rLHS(24,14)+=gauss_weight*(-crLHS1065*crLHS540 - crLHS1066*crLHS540 + crLHS1067*crLHS540 - crLHS1068*crLHS540 + crLHS264*crLHS305 + crLHS856);
rLHS(24,15)+=0;
rLHS(24,16)+=crLHS970;
rLHS(24,17)+=crLHS971;
rLHS(24,18)+=crLHS972;
rLHS(24,19)+=gauss_weight*(-crLHS1065*crLHS546 - crLHS1066*crLHS546 + crLHS1067*crLHS546 - crLHS1068*crLHS546 + crLHS294*crLHS305 + crLHS973);
rLHS(24,20)+=0;
rLHS(24,21)+=crLHS1069*crLHS169;
rLHS(24,22)+=crLHS1069*crLHS187;
rLHS(24,23)+=crLHS1069*crLHS195;
rLHS(24,24)+=gauss_weight*(crLHS1041 - crLHS1065*crLHS552 - crLHS1066*crLHS552 + crLHS1067*crLHS552 - crLHS1068*crLHS552 + crLHS305*crLHS324 + crLHS986*kappa + crLHS987*kappa + crLHS988*kappa - crLHS990*dp_th_dt);
rLHS(24,25)+=0;
rLHS(24,26)+=crLHS1070;
rLHS(24,27)+=crLHS1071;
rLHS(24,28)+=crLHS1072;
rLHS(24,29)+=gauss_weight*(-crLHS1065*crLHS558 - crLHS1066*crLHS558 + crLHS1067*crLHS558 - crLHS1068*crLHS558 + crLHS1073 + crLHS305*crLHS354);
rLHS(24,30)+=0;
rLHS(24,31)+=crLHS1074;
rLHS(24,32)+=crLHS1075;
rLHS(24,33)+=crLHS1076;
rLHS(24,34)+=gauss_weight*(-crLHS1065*crLHS564 - crLHS1066*crLHS564 + crLHS1067*crLHS564 - crLHS1068*crLHS564 + crLHS1077 + crLHS305*crLHS384);
rLHS(24,35)+=0;
rLHS(24,36)+=crLHS1078;
rLHS(24,37)+=crLHS1079;
rLHS(24,38)+=crLHS1080;
rLHS(24,39)+=gauss_weight*(-crLHS1065*crLHS570 - crLHS1066*crLHS570 + crLHS1067*crLHS570 - crLHS1068*crLHS570 + crLHS1081 + crLHS305*crLHS411);
rLHS(25,0)+=crLHS107;
rLHS(25,1)+=crLHS10*(crLHS110 + crLHS22*r_DN(5,0) + crLHS326);
rLHS(25,2)+=crLHS10*(crLHS117 + crLHS22*r_DN(5,1) + crLHS459);
rLHS(25,3)+=crLHS10*(crLHS119 + crLHS22*r_DN(5,2) + crLHS507);
rLHS(25,4)+=crLHS121;
rLHS(25,5)+=crLHS617;
rLHS(25,6)+=crLHS10*(crLHS41*r_DN(5,0) + crLHS620 + crLHS674);
rLHS(25,7)+=crLHS10*(crLHS41*r_DN(5,1) + crLHS622 + crLHS691);
rLHS(25,8)+=crLHS10*(crLHS41*r_DN(5,2) + crLHS624 + crLHS699);
rLHS(25,9)+=crLHS625;
rLHS(25,10)+=crLHS764;
rLHS(25,11)+=crLHS10*(crLHS61*r_DN(5,0) + crLHS767 + crLHS818);
rLHS(25,12)+=crLHS10*(crLHS61*r_DN(5,1) + crLHS769 + crLHS834);
rLHS(25,13)+=crLHS10*(crLHS61*r_DN(5,2) + crLHS771 + crLHS841);
rLHS(25,14)+=crLHS772;
rLHS(25,15)+=crLHS890;
rLHS(25,16)+=crLHS10*(crLHS79*r_DN(5,0) + crLHS893 + crLHS941);
rLHS(25,17)+=crLHS10*(crLHS79*r_DN(5,1) + crLHS895 + crLHS956);
rLHS(25,18)+=crLHS10*(crLHS79*r_DN(5,2) + crLHS897 + crLHS962);
rLHS(25,19)+=crLHS898;
rLHS(25,20)+=crLHS994;
rLHS(25,21)+=crLHS10*(crLHS1043 + crLHS97*r_DN(5,0) + crLHS997);
rLHS(25,22)+=crLHS10*(crLHS1057 + crLHS97*r_DN(5,1) + crLHS999);
rLHS(25,23)+=crLHS10*(crLHS1001 + crLHS1062 + crLHS97*r_DN(5,2));
rLHS(25,24)+=crLHS1003;
rLHS(25,25)+=crLHS11*(crLHS1082 + crLHS1083 + crLHS1084);
rLHS(25,26)+=crLHS10*(-crLHS1086*crLHS12 + crLHS115*r_DN(5,0) + r_DN(5,0)*r_N[5]);
rLHS(25,27)+=crLHS10*(-crLHS1086*crLHS23 + crLHS115*r_DN(5,1) + r_DN(5,1)*r_N[5]);
rLHS(25,28)+=crLHS10*(-crLHS1086*crLHS24 + crLHS115*r_DN(5,2) + r_DN(5,2)*r_N[5]);
rLHS(25,29)+=-crLHS1085*crLHS28;
rLHS(25,30)+=crLHS1090;
rLHS(25,31)+=crLHS10*(crLHS1091 + crLHS1093 + crLHS133*r_DN(5,0));
rLHS(25,32)+=crLHS10*(crLHS1094 + crLHS1095 + crLHS133*r_DN(5,1));
rLHS(25,33)+=crLHS10*(crLHS1096 + crLHS1097 + crLHS133*r_DN(5,2));
rLHS(25,34)+=crLHS1099;
rLHS(25,35)+=crLHS1103;
rLHS(25,36)+=crLHS10*(crLHS1104 + crLHS1106 + crLHS151*r_DN(5,0));
rLHS(25,37)+=crLHS10*(crLHS1107 + crLHS1108 + crLHS151*r_DN(5,1));
rLHS(25,38)+=crLHS10*(crLHS1109 + crLHS1110 + crLHS151*r_DN(5,2));
rLHS(25,39)+=crLHS1111;
rLHS(26,0)+=gauss_weight*(-crLHS108 - crLHS1112*r_DN(0,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[5]*tau_u - crLHS206*crLHS326);
rLHS(26,1)+=gauss_weight*(crLHS1113*crLHS171 + crLHS1119 + crLHS164*r_DN(5,0) + crLHS166*r_DN(5,1) + crLHS168*r_DN(5,2));
rLHS(26,2)+=gauss_weight*(crLHS1113*crLHS189 + crLHS181*r_DN(5,0) + crLHS183*r_DN(5,1) + crLHS186*r_DN(5,2));
rLHS(26,3)+=gauss_weight*(crLHS1113*crLHS197 + crLHS190*r_DN(5,0) + crLHS192*r_DN(5,1) + crLHS194*r_DN(5,2));
rLHS(26,4)+=-crLHS1120*crLHS202;
rLHS(26,5)+=gauss_weight*(-crLHS1112*r_DN(1,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[5]*tau_u - crLHS206*crLHS674 - crLHS618);
rLHS(26,6)+=gauss_weight*(crLHS1113*crLHS214 + crLHS1121 + crLHS207*r_DN(5,0) + crLHS209*r_DN(5,1) + crLHS211*r_DN(5,2));
rLHS(26,7)+=gauss_weight*(crLHS1113*crLHS226 + crLHS219*r_DN(5,0) + crLHS221*r_DN(5,1) + crLHS224*r_DN(5,2));
rLHS(26,8)+=gauss_weight*(crLHS1113*crLHS233 + crLHS227*r_DN(5,0) + crLHS229*r_DN(5,1) + crLHS231*r_DN(5,2));
rLHS(26,9)+=-crLHS1120*crLHS235;
rLHS(26,10)+=gauss_weight*(-crLHS1112*r_DN(2,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[5]*tau_u - crLHS206*crLHS818 - crLHS765);
rLHS(26,11)+=gauss_weight*(crLHS1113*crLHS244 + crLHS1122 + crLHS237*r_DN(5,0) + crLHS239*r_DN(5,1) + crLHS241*r_DN(5,2));
rLHS(26,12)+=gauss_weight*(crLHS1113*crLHS256 + crLHS249*r_DN(5,0) + crLHS251*r_DN(5,1) + crLHS254*r_DN(5,2));
rLHS(26,13)+=gauss_weight*(crLHS1113*crLHS263 + crLHS257*r_DN(5,0) + crLHS259*r_DN(5,1) + crLHS261*r_DN(5,2));
rLHS(26,14)+=-crLHS1120*crLHS265;
rLHS(26,15)+=gauss_weight*(-crLHS1112*r_DN(3,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[5]*tau_u - crLHS206*crLHS941 - crLHS891);
rLHS(26,16)+=gauss_weight*(crLHS1113*crLHS274 + crLHS1123 + crLHS267*r_DN(5,0) + crLHS269*r_DN(5,1) + crLHS271*r_DN(5,2));
rLHS(26,17)+=gauss_weight*(crLHS1113*crLHS286 + crLHS279*r_DN(5,0) + crLHS281*r_DN(5,1) + crLHS284*r_DN(5,2));
rLHS(26,18)+=gauss_weight*(crLHS1113*crLHS293 + crLHS287*r_DN(5,0) + crLHS289*r_DN(5,1) + crLHS291*r_DN(5,2));
rLHS(26,19)+=-crLHS1120*crLHS295;
rLHS(26,20)+=gauss_weight*(-crLHS1043*crLHS206 - crLHS1112*r_DN(4,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[5]*tau_u - crLHS995);
rLHS(26,21)+=gauss_weight*(crLHS1113*crLHS304 + crLHS1124 + crLHS297*r_DN(5,0) + crLHS299*r_DN(5,1) + crLHS301*r_DN(5,2));
rLHS(26,22)+=gauss_weight*(crLHS1113*crLHS316 + crLHS309*r_DN(5,0) + crLHS311*r_DN(5,1) + crLHS314*r_DN(5,2));
rLHS(26,23)+=gauss_weight*(crLHS1113*crLHS323 + crLHS317*r_DN(5,0) + crLHS319*r_DN(5,1) + crLHS321*r_DN(5,2));
rLHS(26,24)+=-crLHS1120*crLHS325;
rLHS(26,25)+=crLHS1125*r_DN(5,0);
rLHS(26,26)+=gauss_weight*(crLHS1113*crLHS334 + crLHS1127 + crLHS327*r_DN(5,0) + crLHS329*r_DN(5,1) + crLHS331*r_DN(5,2));
rLHS(26,27)+=gauss_weight*(crLHS1113*crLHS346 + crLHS339*r_DN(5,0) + crLHS341*r_DN(5,1) + crLHS344*r_DN(5,2));
rLHS(26,28)+=gauss_weight*(crLHS1113*crLHS353 + crLHS347*r_DN(5,0) + crLHS349*r_DN(5,1) + crLHS351*r_DN(5,2));
rLHS(26,29)+=-crLHS1120*crLHS355;
rLHS(26,30)+=gauss_weight*(-crLHS1091*crLHS206 - crLHS1112*r_DN(6,0) - crLHS1128 + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[5]*tau_u);
rLHS(26,31)+=gauss_weight*(crLHS1113*crLHS364 + crLHS1131 + crLHS357*r_DN(5,0) + crLHS359*r_DN(5,1) + crLHS361*r_DN(5,2));
rLHS(26,32)+=gauss_weight*(crLHS1113*crLHS376 + crLHS369*r_DN(5,0) + crLHS371*r_DN(5,1) + crLHS374*r_DN(5,2));
rLHS(26,33)+=gauss_weight*(crLHS1113*crLHS383 + crLHS377*r_DN(5,0) + crLHS379*r_DN(5,1) + crLHS381*r_DN(5,2));
rLHS(26,34)+=-crLHS1120*crLHS385;
rLHS(26,35)+=gauss_weight*(-crLHS1104*crLHS206 - crLHS1112*r_DN(7,0) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*tau_u - crLHS1132 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[5]*tau_u);
rLHS(26,36)+=gauss_weight*(crLHS1113*crLHS393 + crLHS1135 + crLHS387*r_DN(5,0) + crLHS389*r_DN(5,1) + crLHS391*r_DN(5,2));
rLHS(26,37)+=gauss_weight*(crLHS1113*crLHS404 + crLHS398*r_DN(5,0) + crLHS400*r_DN(5,1) + crLHS403*r_DN(5,2));
rLHS(26,38)+=gauss_weight*(crLHS1113*crLHS410 + crLHS405*r_DN(5,0) + crLHS407*r_DN(5,1) + crLHS409*r_DN(5,2));
rLHS(26,39)+=-crLHS1120*crLHS412;
rLHS(27,0)+=gauss_weight*(-crLHS1112*r_DN(0,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u - crLHS116 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[5]*tau_u - crLHS206*crLHS459);
rLHS(27,1)+=gauss_weight*(crLHS1136*crLHS171 + crLHS166*r_DN(5,0) + crLHS413*r_DN(5,1) + crLHS414*r_DN(5,2));
rLHS(27,2)+=gauss_weight*(crLHS1119 + crLHS1136*crLHS189 + crLHS183*r_DN(5,0) + crLHS416*r_DN(5,1) + crLHS418*r_DN(5,2));
rLHS(27,3)+=gauss_weight*(crLHS1136*crLHS197 + crLHS192*r_DN(5,0) + crLHS419*r_DN(5,1) + crLHS421*r_DN(5,2));
rLHS(27,4)+=-crLHS1137*crLHS202;
rLHS(27,5)+=gauss_weight*(-crLHS1112*r_DN(1,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[5]*tau_u - crLHS206*crLHS691 - crLHS621);
rLHS(27,6)+=gauss_weight*(crLHS1136*crLHS214 + crLHS209*r_DN(5,0) + crLHS424*r_DN(5,1) + crLHS425*r_DN(5,2));
rLHS(27,7)+=gauss_weight*(crLHS1121 + crLHS1136*crLHS226 + crLHS221*r_DN(5,0) + crLHS426*r_DN(5,1) + crLHS428*r_DN(5,2));
rLHS(27,8)+=gauss_weight*(crLHS1136*crLHS233 + crLHS229*r_DN(5,0) + crLHS429*r_DN(5,1) + crLHS431*r_DN(5,2));
rLHS(27,9)+=-crLHS1137*crLHS235;
rLHS(27,10)+=gauss_weight*(-crLHS1112*r_DN(2,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[5]*tau_u - crLHS206*crLHS834 - crLHS768);
rLHS(27,11)+=gauss_weight*(crLHS1136*crLHS244 + crLHS239*r_DN(5,0) + crLHS433*r_DN(5,1) + crLHS434*r_DN(5,2));
rLHS(27,12)+=gauss_weight*(crLHS1122 + crLHS1136*crLHS256 + crLHS251*r_DN(5,0) + crLHS435*r_DN(5,1) + crLHS437*r_DN(5,2));
rLHS(27,13)+=gauss_weight*(crLHS1136*crLHS263 + crLHS259*r_DN(5,0) + crLHS438*r_DN(5,1) + crLHS440*r_DN(5,2));
rLHS(27,14)+=-crLHS1137*crLHS265;
rLHS(27,15)+=gauss_weight*(-crLHS1112*r_DN(3,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[5]*tau_u - crLHS206*crLHS956 - crLHS894);
rLHS(27,16)+=gauss_weight*(crLHS1136*crLHS274 + crLHS269*r_DN(5,0) + crLHS442*r_DN(5,1) + crLHS443*r_DN(5,2));
rLHS(27,17)+=gauss_weight*(crLHS1123 + crLHS1136*crLHS286 + crLHS281*r_DN(5,0) + crLHS444*r_DN(5,1) + crLHS446*r_DN(5,2));
rLHS(27,18)+=gauss_weight*(crLHS1136*crLHS293 + crLHS289*r_DN(5,0) + crLHS447*r_DN(5,1) + crLHS449*r_DN(5,2));
rLHS(27,19)+=-crLHS1137*crLHS295;
rLHS(27,20)+=gauss_weight*(-crLHS1057*crLHS206 - crLHS1112*r_DN(4,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[5]*tau_u - crLHS998);
rLHS(27,21)+=gauss_weight*(crLHS1136*crLHS304 + crLHS299*r_DN(5,0) + crLHS451*r_DN(5,1) + crLHS452*r_DN(5,2));
rLHS(27,22)+=gauss_weight*(crLHS1124 + crLHS1136*crLHS316 + crLHS311*r_DN(5,0) + crLHS453*r_DN(5,1) + crLHS455*r_DN(5,2));
rLHS(27,23)+=gauss_weight*(crLHS1136*crLHS323 + crLHS319*r_DN(5,0) + crLHS456*r_DN(5,1) + crLHS458*r_DN(5,2));
rLHS(27,24)+=-crLHS1137*crLHS325;
rLHS(27,25)+=crLHS1125*r_DN(5,1);
rLHS(27,26)+=gauss_weight*(crLHS1136*crLHS334 + crLHS329*r_DN(5,0) + crLHS460*r_DN(5,1) + crLHS461*r_DN(5,2));
rLHS(27,27)+=gauss_weight*(crLHS1127 + crLHS1136*crLHS346 + crLHS341*r_DN(5,0) + crLHS462*r_DN(5,1) + crLHS464*r_DN(5,2));
rLHS(27,28)+=gauss_weight*(crLHS1136*crLHS353 + crLHS349*r_DN(5,0) + crLHS465*r_DN(5,1) + crLHS467*r_DN(5,2));
rLHS(27,29)+=-crLHS1137*crLHS355;
rLHS(27,30)+=gauss_weight*(-crLHS1094*crLHS206 - crLHS1112*r_DN(6,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*tau_u - crLHS1138 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[5]*tau_u);
rLHS(27,31)+=gauss_weight*(crLHS1136*crLHS364 + crLHS359*r_DN(5,0) + crLHS469*r_DN(5,1) + crLHS470*r_DN(5,2));
rLHS(27,32)+=gauss_weight*(crLHS1131 + crLHS1136*crLHS376 + crLHS371*r_DN(5,0) + crLHS471*r_DN(5,1) + crLHS473*r_DN(5,2));
rLHS(27,33)+=gauss_weight*(crLHS1136*crLHS383 + crLHS379*r_DN(5,0) + crLHS474*r_DN(5,1) + crLHS476*r_DN(5,2));
rLHS(27,34)+=-crLHS1137*crLHS385;
rLHS(27,35)+=gauss_weight*(-crLHS1107*crLHS206 - crLHS1112*r_DN(7,1) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*tau_u - crLHS1139 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[5]*tau_u);
rLHS(27,36)+=gauss_weight*(crLHS1136*crLHS393 + crLHS389*r_DN(5,0) + crLHS478*r_DN(5,1) + crLHS479*r_DN(5,2));
rLHS(27,37)+=gauss_weight*(crLHS1135 + crLHS1136*crLHS404 + crLHS400*r_DN(5,0) + crLHS480*r_DN(5,1) + crLHS482*r_DN(5,2));
rLHS(27,38)+=gauss_weight*(crLHS1136*crLHS410 + crLHS407*r_DN(5,0) + crLHS483*r_DN(5,1) + crLHS485*r_DN(5,2));
rLHS(27,39)+=-crLHS1137*crLHS412;
rLHS(28,0)+=gauss_weight*(-crLHS1112*r_DN(0,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u - crLHS118 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[5]*tau_u - crLHS206*crLHS507);
rLHS(28,1)+=gauss_weight*(crLHS1140*crLHS171 + crLHS168*r_DN(5,0) + crLHS414*r_DN(5,1) + crLHS486*r_DN(5,2));
rLHS(28,2)+=gauss_weight*(crLHS1140*crLHS189 + crLHS186*r_DN(5,0) + crLHS418*r_DN(5,1) + crLHS488*r_DN(5,2));
rLHS(28,3)+=gauss_weight*(crLHS1119 + crLHS1140*crLHS197 + crLHS194*r_DN(5,0) + crLHS421*r_DN(5,1) + crLHS489*r_DN(5,2));
rLHS(28,4)+=-crLHS1141*crLHS202;
rLHS(28,5)+=gauss_weight*(-crLHS1112*r_DN(1,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[5]*tau_u - crLHS206*crLHS699 - crLHS623);
rLHS(28,6)+=gauss_weight*(crLHS1140*crLHS214 + crLHS211*r_DN(5,0) + crLHS425*r_DN(5,1) + crLHS492*r_DN(5,2));
rLHS(28,7)+=gauss_weight*(crLHS1140*crLHS226 + crLHS224*r_DN(5,0) + crLHS428*r_DN(5,1) + crLHS493*r_DN(5,2));
rLHS(28,8)+=gauss_weight*(crLHS1121 + crLHS1140*crLHS233 + crLHS231*r_DN(5,0) + crLHS431*r_DN(5,1) + crLHS494*r_DN(5,2));
rLHS(28,9)+=-crLHS1141*crLHS235;
rLHS(28,10)+=gauss_weight*(-crLHS1112*r_DN(2,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[5]*tau_u - crLHS206*crLHS841 - crLHS770);
rLHS(28,11)+=gauss_weight*(crLHS1140*crLHS244 + crLHS241*r_DN(5,0) + crLHS434*r_DN(5,1) + crLHS496*r_DN(5,2));
rLHS(28,12)+=gauss_weight*(crLHS1140*crLHS256 + crLHS254*r_DN(5,0) + crLHS437*r_DN(5,1) + crLHS497*r_DN(5,2));
rLHS(28,13)+=gauss_weight*(crLHS1122 + crLHS1140*crLHS263 + crLHS261*r_DN(5,0) + crLHS440*r_DN(5,1) + crLHS498*r_DN(5,2));
rLHS(28,14)+=-crLHS1141*crLHS265;
rLHS(28,15)+=gauss_weight*(-crLHS1112*r_DN(3,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[5]*tau_u - crLHS206*crLHS962 - crLHS896);
rLHS(28,16)+=gauss_weight*(crLHS1140*crLHS274 + crLHS271*r_DN(5,0) + crLHS443*r_DN(5,1) + crLHS500*r_DN(5,2));
rLHS(28,17)+=gauss_weight*(crLHS1140*crLHS286 + crLHS284*r_DN(5,0) + crLHS446*r_DN(5,1) + crLHS501*r_DN(5,2));
rLHS(28,18)+=gauss_weight*(crLHS1123 + crLHS1140*crLHS293 + crLHS291*r_DN(5,0) + crLHS449*r_DN(5,1) + crLHS502*r_DN(5,2));
rLHS(28,19)+=-crLHS1141*crLHS295;
rLHS(28,20)+=gauss_weight*(-crLHS1000 - crLHS1062*crLHS206 - crLHS1112*r_DN(4,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[5]*tau_u);
rLHS(28,21)+=gauss_weight*(crLHS1140*crLHS304 + crLHS301*r_DN(5,0) + crLHS452*r_DN(5,1) + crLHS504*r_DN(5,2));
rLHS(28,22)+=gauss_weight*(crLHS1140*crLHS316 + crLHS314*r_DN(5,0) + crLHS455*r_DN(5,1) + crLHS505*r_DN(5,2));
rLHS(28,23)+=gauss_weight*(crLHS1124 + crLHS1140*crLHS323 + crLHS321*r_DN(5,0) + crLHS458*r_DN(5,1) + crLHS506*r_DN(5,2));
rLHS(28,24)+=-crLHS1141*crLHS325;
rLHS(28,25)+=crLHS1125*r_DN(5,2);
rLHS(28,26)+=gauss_weight*(crLHS1140*crLHS334 + crLHS331*r_DN(5,0) + crLHS461*r_DN(5,1) + crLHS508*r_DN(5,2));
rLHS(28,27)+=gauss_weight*(crLHS1140*crLHS346 + crLHS344*r_DN(5,0) + crLHS464*r_DN(5,1) + crLHS509*r_DN(5,2));
rLHS(28,28)+=gauss_weight*(crLHS1127 + crLHS1140*crLHS353 + crLHS351*r_DN(5,0) + crLHS467*r_DN(5,1) + crLHS510*r_DN(5,2));
rLHS(28,29)+=-crLHS1141*crLHS355;
rLHS(28,30)+=gauss_weight*(-crLHS1096*crLHS206 - crLHS1112*r_DN(6,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*tau_u - crLHS1142 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[5]*tau_u);
rLHS(28,31)+=gauss_weight*(crLHS1140*crLHS364 + crLHS361*r_DN(5,0) + crLHS470*r_DN(5,1) + crLHS512*r_DN(5,2));
rLHS(28,32)+=gauss_weight*(crLHS1140*crLHS376 + crLHS374*r_DN(5,0) + crLHS473*r_DN(5,1) + crLHS513*r_DN(5,2));
rLHS(28,33)+=gauss_weight*(crLHS1131 + crLHS1140*crLHS383 + crLHS381*r_DN(5,0) + crLHS476*r_DN(5,1) + crLHS514*r_DN(5,2));
rLHS(28,34)+=-crLHS1141*crLHS385;
rLHS(28,35)+=gauss_weight*(-crLHS1109*crLHS206 - crLHS1112*r_DN(7,2) + crLHS113*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*tau_u - crLHS1143 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[5]*tau_u);
rLHS(28,36)+=gauss_weight*(crLHS1140*crLHS393 + crLHS391*r_DN(5,0) + crLHS479*r_DN(5,1) + crLHS516*r_DN(5,2));
rLHS(28,37)+=gauss_weight*(crLHS1140*crLHS404 + crLHS403*r_DN(5,0) + crLHS482*r_DN(5,1) + crLHS517*r_DN(5,2));
rLHS(28,38)+=gauss_weight*(crLHS1135 + crLHS1140*crLHS410 + crLHS409*r_DN(5,0) + crLHS485*r_DN(5,1) + crLHS518*r_DN(5,2));
rLHS(28,39)+=-crLHS1141*crLHS412;
rLHS(29,0)+=0;
rLHS(29,1)+=crLHS554;
rLHS(29,2)+=crLHS555;
rLHS(29,3)+=crLHS556;
rLHS(29,4)+=gauss_weight*(-crLHS1144*crLHS521 - crLHS1145*crLHS521 + crLHS1146*crLHS521 - crLHS1147*crLHS521 + crLHS201*crLHS335 + crLHS559);
rLHS(29,5)+=0;
rLHS(29,6)+=crLHS719;
rLHS(29,7)+=crLHS720;
rLHS(29,8)+=crLHS721;
rLHS(29,9)+=gauss_weight*(-crLHS1144*crLHS534 - crLHS1145*crLHS534 + crLHS1146*crLHS534 - crLHS1147*crLHS534 + crLHS234*crLHS335 + crLHS722);
rLHS(29,10)+=0;
rLHS(29,11)+=crLHS857;
rLHS(29,12)+=crLHS858;
rLHS(29,13)+=crLHS859;
rLHS(29,14)+=gauss_weight*(-crLHS1144*crLHS540 - crLHS1145*crLHS540 + crLHS1146*crLHS540 - crLHS1147*crLHS540 + crLHS264*crLHS335 + crLHS860);
rLHS(29,15)+=0;
rLHS(29,16)+=crLHS974;
rLHS(29,17)+=crLHS975;
rLHS(29,18)+=crLHS976;
rLHS(29,19)+=gauss_weight*(-crLHS1144*crLHS546 - crLHS1145*crLHS546 + crLHS1146*crLHS546 - crLHS1147*crLHS546 + crLHS294*crLHS335 + crLHS977);
rLHS(29,20)+=0;
rLHS(29,21)+=crLHS1070;
rLHS(29,22)+=crLHS1071;
rLHS(29,23)+=crLHS1072;
rLHS(29,24)+=gauss_weight*(crLHS1073 - crLHS1144*crLHS552 - crLHS1145*crLHS552 + crLHS1146*crLHS552 - crLHS1147*crLHS552 + crLHS324*crLHS335);
rLHS(29,25)+=0;
rLHS(29,26)+=crLHS1148*crLHS169;
rLHS(29,27)+=crLHS1148*crLHS187;
rLHS(29,28)+=crLHS1148*crLHS195;
rLHS(29,29)+=gauss_weight*(crLHS1082*kappa + crLHS1083*kappa + crLHS1084*kappa - crLHS1086*dp_th_dt + crLHS1126 - crLHS1144*crLHS558 - crLHS1145*crLHS558 + crLHS1146*crLHS558 - crLHS1147*crLHS558 + crLHS335*crLHS354);
rLHS(29,30)+=0;
rLHS(29,31)+=crLHS1149;
rLHS(29,32)+=crLHS1150;
rLHS(29,33)+=crLHS1151;
rLHS(29,34)+=gauss_weight*(-crLHS1144*crLHS564 - crLHS1145*crLHS564 + crLHS1146*crLHS564 - crLHS1147*crLHS564 + crLHS1152 + crLHS335*crLHS384);
rLHS(29,35)+=0;
rLHS(29,36)+=crLHS1153;
rLHS(29,37)+=crLHS1154;
rLHS(29,38)+=crLHS1155;
rLHS(29,39)+=gauss_weight*(-crLHS1144*crLHS570 - crLHS1145*crLHS570 + crLHS1146*crLHS570 - crLHS1147*crLHS570 + crLHS1156 + crLHS335*crLHS411);
rLHS(30,0)+=crLHS125;
rLHS(30,1)+=crLHS10*(crLHS128 + crLHS22*r_DN(6,0) + crLHS356);
rLHS(30,2)+=crLHS10*(crLHS135 + crLHS22*r_DN(6,1) + crLHS468);
rLHS(30,3)+=crLHS10*(crLHS137 + crLHS22*r_DN(6,2) + crLHS511);
rLHS(30,4)+=crLHS139;
rLHS(30,5)+=crLHS629;
rLHS(30,6)+=crLHS10*(crLHS41*r_DN(6,0) + crLHS632 + crLHS678);
rLHS(30,7)+=crLHS10*(crLHS41*r_DN(6,1) + crLHS634 + crLHS692);
rLHS(30,8)+=crLHS10*(crLHS41*r_DN(6,2) + crLHS636 + crLHS700);
rLHS(30,9)+=crLHS637;
rLHS(30,10)+=crLHS776;
rLHS(30,11)+=crLHS10*(crLHS61*r_DN(6,0) + crLHS779 + crLHS822);
rLHS(30,12)+=crLHS10*(crLHS61*r_DN(6,1) + crLHS781 + crLHS835);
rLHS(30,13)+=crLHS10*(crLHS61*r_DN(6,2) + crLHS783 + crLHS842);
rLHS(30,14)+=crLHS784;
rLHS(30,15)+=crLHS902;
rLHS(30,16)+=crLHS10*(crLHS79*r_DN(6,0) + crLHS905 + crLHS945);
rLHS(30,17)+=crLHS10*(crLHS79*r_DN(6,1) + crLHS907 + crLHS957);
rLHS(30,18)+=crLHS10*(crLHS79*r_DN(6,2) + crLHS909 + crLHS963);
rLHS(30,19)+=crLHS910;
rLHS(30,20)+=crLHS1007;
rLHS(30,21)+=crLHS10*(crLHS1010 + crLHS1047 + crLHS97*r_DN(6,0));
rLHS(30,22)+=crLHS10*(crLHS1012 + crLHS1058 + crLHS97*r_DN(6,1));
rLHS(30,23)+=crLHS10*(crLHS1014 + crLHS1063 + crLHS97*r_DN(6,2));
rLHS(30,24)+=crLHS1015;
rLHS(30,25)+=crLHS1090;
rLHS(30,26)+=crLHS10*(crLHS1093 + crLHS1128 + crLHS115*r_DN(6,0));
rLHS(30,27)+=crLHS10*(crLHS1095 + crLHS1138 + crLHS115*r_DN(6,1));
rLHS(30,28)+=crLHS10*(crLHS1097 + crLHS1142 + crLHS115*r_DN(6,2));
rLHS(30,29)+=crLHS1099;
rLHS(30,30)+=crLHS11*(crLHS1157 + crLHS1158 + crLHS1159);
rLHS(30,31)+=crLHS10*(-crLHS1161*crLHS12 + crLHS133*r_DN(6,0) + r_DN(6,0)*r_N[6]);
rLHS(30,32)+=crLHS10*(-crLHS1161*crLHS23 + crLHS133*r_DN(6,1) + r_DN(6,1)*r_N[6]);
rLHS(30,33)+=crLHS10*(-crLHS1161*crLHS24 + crLHS133*r_DN(6,2) + r_DN(6,2)*r_N[6]);
rLHS(30,34)+=-crLHS1160*crLHS28;
rLHS(30,35)+=crLHS1165;
rLHS(30,36)+=crLHS10*(crLHS1166 + crLHS1168 + crLHS151*r_DN(6,0));
rLHS(30,37)+=crLHS10*(crLHS1169 + crLHS1170 + crLHS151*r_DN(6,1));
rLHS(30,38)+=crLHS10*(crLHS1171 + crLHS1172 + crLHS151*r_DN(6,2));
rLHS(30,39)+=crLHS1173;
rLHS(31,0)+=gauss_weight*(-crLHS1174*r_DN(0,0) - crLHS126 + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[6]*tau_u - crLHS206*crLHS356);
rLHS(31,1)+=gauss_weight*(crLHS1175*crLHS171 + crLHS1181 + crLHS164*r_DN(6,0) + crLHS166*r_DN(6,1) + crLHS168*r_DN(6,2));
rLHS(31,2)+=gauss_weight*(crLHS1175*crLHS189 + crLHS181*r_DN(6,0) + crLHS183*r_DN(6,1) + crLHS186*r_DN(6,2));
rLHS(31,3)+=gauss_weight*(crLHS1175*crLHS197 + crLHS190*r_DN(6,0) + crLHS192*r_DN(6,1) + crLHS194*r_DN(6,2));
rLHS(31,4)+=-crLHS1182*crLHS202;
rLHS(31,5)+=gauss_weight*(-crLHS1174*r_DN(1,0) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[6]*tau_u - crLHS206*crLHS678 - crLHS630);
rLHS(31,6)+=gauss_weight*(crLHS1175*crLHS214 + crLHS1183 + crLHS207*r_DN(6,0) + crLHS209*r_DN(6,1) + crLHS211*r_DN(6,2));
rLHS(31,7)+=gauss_weight*(crLHS1175*crLHS226 + crLHS219*r_DN(6,0) + crLHS221*r_DN(6,1) + crLHS224*r_DN(6,2));
rLHS(31,8)+=gauss_weight*(crLHS1175*crLHS233 + crLHS227*r_DN(6,0) + crLHS229*r_DN(6,1) + crLHS231*r_DN(6,2));
rLHS(31,9)+=-crLHS1182*crLHS235;
rLHS(31,10)+=gauss_weight*(-crLHS1174*r_DN(2,0) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[6]*tau_u - crLHS206*crLHS822 - crLHS777);
rLHS(31,11)+=gauss_weight*(crLHS1175*crLHS244 + crLHS1184 + crLHS237*r_DN(6,0) + crLHS239*r_DN(6,1) + crLHS241*r_DN(6,2));
rLHS(31,12)+=gauss_weight*(crLHS1175*crLHS256 + crLHS249*r_DN(6,0) + crLHS251*r_DN(6,1) + crLHS254*r_DN(6,2));
rLHS(31,13)+=gauss_weight*(crLHS1175*crLHS263 + crLHS257*r_DN(6,0) + crLHS259*r_DN(6,1) + crLHS261*r_DN(6,2));
rLHS(31,14)+=-crLHS1182*crLHS265;
rLHS(31,15)+=gauss_weight*(-crLHS1174*r_DN(3,0) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[6]*tau_u - crLHS206*crLHS945 - crLHS903);
rLHS(31,16)+=gauss_weight*(crLHS1175*crLHS274 + crLHS1185 + crLHS267*r_DN(6,0) + crLHS269*r_DN(6,1) + crLHS271*r_DN(6,2));
rLHS(31,17)+=gauss_weight*(crLHS1175*crLHS286 + crLHS279*r_DN(6,0) + crLHS281*r_DN(6,1) + crLHS284*r_DN(6,2));
rLHS(31,18)+=gauss_weight*(crLHS1175*crLHS293 + crLHS287*r_DN(6,0) + crLHS289*r_DN(6,1) + crLHS291*r_DN(6,2));
rLHS(31,19)+=-crLHS1182*crLHS295;
rLHS(31,20)+=gauss_weight*(-crLHS1008 - crLHS1047*crLHS206 - crLHS1174*r_DN(4,0) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[6]*tau_u);
rLHS(31,21)+=gauss_weight*(crLHS1175*crLHS304 + crLHS1186 + crLHS297*r_DN(6,0) + crLHS299*r_DN(6,1) + crLHS301*r_DN(6,2));
rLHS(31,22)+=gauss_weight*(crLHS1175*crLHS316 + crLHS309*r_DN(6,0) + crLHS311*r_DN(6,1) + crLHS314*r_DN(6,2));
rLHS(31,23)+=gauss_weight*(crLHS1175*crLHS323 + crLHS317*r_DN(6,0) + crLHS319*r_DN(6,1) + crLHS321*r_DN(6,2));
rLHS(31,24)+=-crLHS1182*crLHS325;
rLHS(31,25)+=gauss_weight*(-crLHS1091 - crLHS1128*crLHS206 - crLHS1174*r_DN(5,0) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[6]*tau_u);
rLHS(31,26)+=gauss_weight*(crLHS1175*crLHS334 + crLHS1187 + crLHS327*r_DN(6,0) + crLHS329*r_DN(6,1) + crLHS331*r_DN(6,2));
rLHS(31,27)+=gauss_weight*(crLHS1175*crLHS346 + crLHS339*r_DN(6,0) + crLHS341*r_DN(6,1) + crLHS344*r_DN(6,2));
rLHS(31,28)+=gauss_weight*(crLHS1175*crLHS353 + crLHS347*r_DN(6,0) + crLHS349*r_DN(6,1) + crLHS351*r_DN(6,2));
rLHS(31,29)+=-crLHS1182*crLHS355;
rLHS(31,30)+=crLHS1188*r_DN(6,0);
rLHS(31,31)+=gauss_weight*(crLHS1175*crLHS364 + crLHS1190 + crLHS357*r_DN(6,0) + crLHS359*r_DN(6,1) + crLHS361*r_DN(6,2));
rLHS(31,32)+=gauss_weight*(crLHS1175*crLHS376 + crLHS369*r_DN(6,0) + crLHS371*r_DN(6,1) + crLHS374*r_DN(6,2));
rLHS(31,33)+=gauss_weight*(crLHS1175*crLHS383 + crLHS377*r_DN(6,0) + crLHS379*r_DN(6,1) + crLHS381*r_DN(6,2));
rLHS(31,34)+=-crLHS1182*crLHS385;
rLHS(31,35)+=gauss_weight*(-crLHS1166*crLHS206 - crLHS1174*r_DN(7,0) - crLHS1191 + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,0)*r_N[6]*tau_u);
rLHS(31,36)+=gauss_weight*(crLHS1175*crLHS393 + crLHS1194 + crLHS387*r_DN(6,0) + crLHS389*r_DN(6,1) + crLHS391*r_DN(6,2));
rLHS(31,37)+=gauss_weight*(crLHS1175*crLHS404 + crLHS398*r_DN(6,0) + crLHS400*r_DN(6,1) + crLHS403*r_DN(6,2));
rLHS(31,38)+=gauss_weight*(crLHS1175*crLHS410 + crLHS405*r_DN(6,0) + crLHS407*r_DN(6,1) + crLHS409*r_DN(6,2));
rLHS(31,39)+=-crLHS1182*crLHS412;
rLHS(32,0)+=gauss_weight*(-crLHS1174*r_DN(0,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u - crLHS134 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[6]*tau_u - crLHS206*crLHS468);
rLHS(32,1)+=gauss_weight*(crLHS1195*crLHS171 + crLHS166*r_DN(6,0) + crLHS413*r_DN(6,1) + crLHS414*r_DN(6,2));
rLHS(32,2)+=gauss_weight*(crLHS1181 + crLHS1195*crLHS189 + crLHS183*r_DN(6,0) + crLHS416*r_DN(6,1) + crLHS418*r_DN(6,2));
rLHS(32,3)+=gauss_weight*(crLHS1195*crLHS197 + crLHS192*r_DN(6,0) + crLHS419*r_DN(6,1) + crLHS421*r_DN(6,2));
rLHS(32,4)+=-crLHS1196*crLHS202;
rLHS(32,5)+=gauss_weight*(-crLHS1174*r_DN(1,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[6]*tau_u - crLHS206*crLHS692 - crLHS633);
rLHS(32,6)+=gauss_weight*(crLHS1195*crLHS214 + crLHS209*r_DN(6,0) + crLHS424*r_DN(6,1) + crLHS425*r_DN(6,2));
rLHS(32,7)+=gauss_weight*(crLHS1183 + crLHS1195*crLHS226 + crLHS221*r_DN(6,0) + crLHS426*r_DN(6,1) + crLHS428*r_DN(6,2));
rLHS(32,8)+=gauss_weight*(crLHS1195*crLHS233 + crLHS229*r_DN(6,0) + crLHS429*r_DN(6,1) + crLHS431*r_DN(6,2));
rLHS(32,9)+=-crLHS1196*crLHS235;
rLHS(32,10)+=gauss_weight*(-crLHS1174*r_DN(2,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[6]*tau_u - crLHS206*crLHS835 - crLHS780);
rLHS(32,11)+=gauss_weight*(crLHS1195*crLHS244 + crLHS239*r_DN(6,0) + crLHS433*r_DN(6,1) + crLHS434*r_DN(6,2));
rLHS(32,12)+=gauss_weight*(crLHS1184 + crLHS1195*crLHS256 + crLHS251*r_DN(6,0) + crLHS435*r_DN(6,1) + crLHS437*r_DN(6,2));
rLHS(32,13)+=gauss_weight*(crLHS1195*crLHS263 + crLHS259*r_DN(6,0) + crLHS438*r_DN(6,1) + crLHS440*r_DN(6,2));
rLHS(32,14)+=-crLHS1196*crLHS265;
rLHS(32,15)+=gauss_weight*(-crLHS1174*r_DN(3,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[6]*tau_u - crLHS206*crLHS957 - crLHS906);
rLHS(32,16)+=gauss_weight*(crLHS1195*crLHS274 + crLHS269*r_DN(6,0) + crLHS442*r_DN(6,1) + crLHS443*r_DN(6,2));
rLHS(32,17)+=gauss_weight*(crLHS1185 + crLHS1195*crLHS286 + crLHS281*r_DN(6,0) + crLHS444*r_DN(6,1) + crLHS446*r_DN(6,2));
rLHS(32,18)+=gauss_weight*(crLHS1195*crLHS293 + crLHS289*r_DN(6,0) + crLHS447*r_DN(6,1) + crLHS449*r_DN(6,2));
rLHS(32,19)+=-crLHS1196*crLHS295;
rLHS(32,20)+=gauss_weight*(-crLHS1011 - crLHS1058*crLHS206 - crLHS1174*r_DN(4,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[6]*tau_u);
rLHS(32,21)+=gauss_weight*(crLHS1195*crLHS304 + crLHS299*r_DN(6,0) + crLHS451*r_DN(6,1) + crLHS452*r_DN(6,2));
rLHS(32,22)+=gauss_weight*(crLHS1186 + crLHS1195*crLHS316 + crLHS311*r_DN(6,0) + crLHS453*r_DN(6,1) + crLHS455*r_DN(6,2));
rLHS(32,23)+=gauss_weight*(crLHS1195*crLHS323 + crLHS319*r_DN(6,0) + crLHS456*r_DN(6,1) + crLHS458*r_DN(6,2));
rLHS(32,24)+=-crLHS1196*crLHS325;
rLHS(32,25)+=gauss_weight*(-crLHS1094 - crLHS1138*crLHS206 - crLHS1174*r_DN(5,1) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[6]*tau_u);
rLHS(32,26)+=gauss_weight*(crLHS1195*crLHS334 + crLHS329*r_DN(6,0) + crLHS460*r_DN(6,1) + crLHS461*r_DN(6,2));
rLHS(32,27)+=gauss_weight*(crLHS1187 + crLHS1195*crLHS346 + crLHS341*r_DN(6,0) + crLHS462*r_DN(6,1) + crLHS464*r_DN(6,2));
rLHS(32,28)+=gauss_weight*(crLHS1195*crLHS353 + crLHS349*r_DN(6,0) + crLHS465*r_DN(6,1) + crLHS467*r_DN(6,2));
rLHS(32,29)+=-crLHS1196*crLHS355;
rLHS(32,30)+=crLHS1188*r_DN(6,1);
rLHS(32,31)+=gauss_weight*(crLHS1195*crLHS364 + crLHS359*r_DN(6,0) + crLHS469*r_DN(6,1) + crLHS470*r_DN(6,2));
rLHS(32,32)+=gauss_weight*(crLHS1190 + crLHS1195*crLHS376 + crLHS371*r_DN(6,0) + crLHS471*r_DN(6,1) + crLHS473*r_DN(6,2));
rLHS(32,33)+=gauss_weight*(crLHS1195*crLHS383 + crLHS379*r_DN(6,0) + crLHS474*r_DN(6,1) + crLHS476*r_DN(6,2));
rLHS(32,34)+=-crLHS1196*crLHS385;
rLHS(32,35)+=gauss_weight*(-crLHS1169*crLHS206 - crLHS1174*r_DN(7,1) - crLHS1197 + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,1)*r_N[6]*tau_u);
rLHS(32,36)+=gauss_weight*(crLHS1195*crLHS393 + crLHS389*r_DN(6,0) + crLHS478*r_DN(6,1) + crLHS479*r_DN(6,2));
rLHS(32,37)+=gauss_weight*(crLHS1194 + crLHS1195*crLHS404 + crLHS400*r_DN(6,0) + crLHS480*r_DN(6,1) + crLHS482*r_DN(6,2));
rLHS(32,38)+=gauss_weight*(crLHS1195*crLHS410 + crLHS407*r_DN(6,0) + crLHS483*r_DN(6,1) + crLHS485*r_DN(6,2));
rLHS(32,39)+=-crLHS1196*crLHS412;
rLHS(33,0)+=gauss_weight*(-crLHS1174*r_DN(0,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u - crLHS136 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[6]*tau_u - crLHS206*crLHS511);
rLHS(33,1)+=gauss_weight*(crLHS1198*crLHS171 + crLHS168*r_DN(6,0) + crLHS414*r_DN(6,1) + crLHS486*r_DN(6,2));
rLHS(33,2)+=gauss_weight*(crLHS1198*crLHS189 + crLHS186*r_DN(6,0) + crLHS418*r_DN(6,1) + crLHS488*r_DN(6,2));
rLHS(33,3)+=gauss_weight*(crLHS1181 + crLHS1198*crLHS197 + crLHS194*r_DN(6,0) + crLHS421*r_DN(6,1) + crLHS489*r_DN(6,2));
rLHS(33,4)+=-crLHS1199*crLHS202;
rLHS(33,5)+=gauss_weight*(-crLHS1174*r_DN(1,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[6]*tau_u - crLHS206*crLHS700 - crLHS635);
rLHS(33,6)+=gauss_weight*(crLHS1198*crLHS214 + crLHS211*r_DN(6,0) + crLHS425*r_DN(6,1) + crLHS492*r_DN(6,2));
rLHS(33,7)+=gauss_weight*(crLHS1198*crLHS226 + crLHS224*r_DN(6,0) + crLHS428*r_DN(6,1) + crLHS493*r_DN(6,2));
rLHS(33,8)+=gauss_weight*(crLHS1183 + crLHS1198*crLHS233 + crLHS231*r_DN(6,0) + crLHS431*r_DN(6,1) + crLHS494*r_DN(6,2));
rLHS(33,9)+=-crLHS1199*crLHS235;
rLHS(33,10)+=gauss_weight*(-crLHS1174*r_DN(2,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[6]*tau_u - crLHS206*crLHS842 - crLHS782);
rLHS(33,11)+=gauss_weight*(crLHS1198*crLHS244 + crLHS241*r_DN(6,0) + crLHS434*r_DN(6,1) + crLHS496*r_DN(6,2));
rLHS(33,12)+=gauss_weight*(crLHS1198*crLHS256 + crLHS254*r_DN(6,0) + crLHS437*r_DN(6,1) + crLHS497*r_DN(6,2));
rLHS(33,13)+=gauss_weight*(crLHS1184 + crLHS1198*crLHS263 + crLHS261*r_DN(6,0) + crLHS440*r_DN(6,1) + crLHS498*r_DN(6,2));
rLHS(33,14)+=-crLHS1199*crLHS265;
rLHS(33,15)+=gauss_weight*(-crLHS1174*r_DN(3,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[6]*tau_u - crLHS206*crLHS963 - crLHS908);
rLHS(33,16)+=gauss_weight*(crLHS1198*crLHS274 + crLHS271*r_DN(6,0) + crLHS443*r_DN(6,1) + crLHS500*r_DN(6,2));
rLHS(33,17)+=gauss_weight*(crLHS1198*crLHS286 + crLHS284*r_DN(6,0) + crLHS446*r_DN(6,1) + crLHS501*r_DN(6,2));
rLHS(33,18)+=gauss_weight*(crLHS1185 + crLHS1198*crLHS293 + crLHS291*r_DN(6,0) + crLHS449*r_DN(6,1) + crLHS502*r_DN(6,2));
rLHS(33,19)+=-crLHS1199*crLHS295;
rLHS(33,20)+=gauss_weight*(-crLHS1013 - crLHS1063*crLHS206 - crLHS1174*r_DN(4,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[6]*tau_u);
rLHS(33,21)+=gauss_weight*(crLHS1198*crLHS304 + crLHS301*r_DN(6,0) + crLHS452*r_DN(6,1) + crLHS504*r_DN(6,2));
rLHS(33,22)+=gauss_weight*(crLHS1198*crLHS316 + crLHS314*r_DN(6,0) + crLHS455*r_DN(6,1) + crLHS505*r_DN(6,2));
rLHS(33,23)+=gauss_weight*(crLHS1186 + crLHS1198*crLHS323 + crLHS321*r_DN(6,0) + crLHS458*r_DN(6,1) + crLHS506*r_DN(6,2));
rLHS(33,24)+=-crLHS1199*crLHS325;
rLHS(33,25)+=gauss_weight*(-crLHS1096 - crLHS1142*crLHS206 - crLHS1174*r_DN(5,2) + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[6]*tau_u);
rLHS(33,26)+=gauss_weight*(crLHS1198*crLHS334 + crLHS331*r_DN(6,0) + crLHS461*r_DN(6,1) + crLHS508*r_DN(6,2));
rLHS(33,27)+=gauss_weight*(crLHS1198*crLHS346 + crLHS344*r_DN(6,0) + crLHS464*r_DN(6,1) + crLHS509*r_DN(6,2));
rLHS(33,28)+=gauss_weight*(crLHS1187 + crLHS1198*crLHS353 + crLHS351*r_DN(6,0) + crLHS467*r_DN(6,1) + crLHS510*r_DN(6,2));
rLHS(33,29)+=-crLHS1199*crLHS355;
rLHS(33,30)+=crLHS1188*r_DN(6,2);
rLHS(33,31)+=gauss_weight*(crLHS1198*crLHS364 + crLHS361*r_DN(6,0) + crLHS470*r_DN(6,1) + crLHS512*r_DN(6,2));
rLHS(33,32)+=gauss_weight*(crLHS1198*crLHS376 + crLHS374*r_DN(6,0) + crLHS473*r_DN(6,1) + crLHS513*r_DN(6,2));
rLHS(33,33)+=gauss_weight*(crLHS1190 + crLHS1198*crLHS383 + crLHS381*r_DN(6,0) + crLHS476*r_DN(6,1) + crLHS514*r_DN(6,2));
rLHS(33,34)+=-crLHS1199*crLHS385;
rLHS(33,35)+=gauss_weight*(-crLHS1171*crLHS206 - crLHS1174*r_DN(7,2) - crLHS1200 + crLHS131*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(7,2)*r_N[6]*tau_u);
rLHS(33,36)+=gauss_weight*(crLHS1198*crLHS393 + crLHS391*r_DN(6,0) + crLHS479*r_DN(6,1) + crLHS516*r_DN(6,2));
rLHS(33,37)+=gauss_weight*(crLHS1198*crLHS404 + crLHS403*r_DN(6,0) + crLHS482*r_DN(6,1) + crLHS517*r_DN(6,2));
rLHS(33,38)+=gauss_weight*(crLHS1194 + crLHS1198*crLHS410 + crLHS409*r_DN(6,0) + crLHS485*r_DN(6,1) + crLHS518*r_DN(6,2));
rLHS(33,39)+=-crLHS1199*crLHS412;
rLHS(34,0)+=0;
rLHS(34,1)+=crLHS560;
rLHS(34,2)+=crLHS561;
rLHS(34,3)+=crLHS562;
rLHS(34,4)+=gauss_weight*(-crLHS1201*crLHS521 - crLHS1202*crLHS521 + crLHS1203*crLHS521 - crLHS1204*crLHS521 + crLHS201*crLHS365 + crLHS565);
rLHS(34,5)+=0;
rLHS(34,6)+=crLHS723;
rLHS(34,7)+=crLHS724;
rLHS(34,8)+=crLHS725;
rLHS(34,9)+=gauss_weight*(-crLHS1201*crLHS534 - crLHS1202*crLHS534 + crLHS1203*crLHS534 - crLHS1204*crLHS534 + crLHS234*crLHS365 + crLHS726);
rLHS(34,10)+=0;
rLHS(34,11)+=crLHS861;
rLHS(34,12)+=crLHS862;
rLHS(34,13)+=crLHS863;
rLHS(34,14)+=gauss_weight*(-crLHS1201*crLHS540 - crLHS1202*crLHS540 + crLHS1203*crLHS540 - crLHS1204*crLHS540 + crLHS264*crLHS365 + crLHS864);
rLHS(34,15)+=0;
rLHS(34,16)+=crLHS978;
rLHS(34,17)+=crLHS979;
rLHS(34,18)+=crLHS980;
rLHS(34,19)+=gauss_weight*(-crLHS1201*crLHS546 - crLHS1202*crLHS546 + crLHS1203*crLHS546 - crLHS1204*crLHS546 + crLHS294*crLHS365 + crLHS981);
rLHS(34,20)+=0;
rLHS(34,21)+=crLHS1074;
rLHS(34,22)+=crLHS1075;
rLHS(34,23)+=crLHS1076;
rLHS(34,24)+=gauss_weight*(crLHS1077 - crLHS1201*crLHS552 - crLHS1202*crLHS552 + crLHS1203*crLHS552 - crLHS1204*crLHS552 + crLHS324*crLHS365);
rLHS(34,25)+=0;
rLHS(34,26)+=crLHS1149;
rLHS(34,27)+=crLHS1150;
rLHS(34,28)+=crLHS1151;
rLHS(34,29)+=gauss_weight*(crLHS1152 - crLHS1201*crLHS558 - crLHS1202*crLHS558 + crLHS1203*crLHS558 - crLHS1204*crLHS558 + crLHS354*crLHS365);
rLHS(34,30)+=0;
rLHS(34,31)+=crLHS1205*crLHS169;
rLHS(34,32)+=crLHS1205*crLHS187;
rLHS(34,33)+=crLHS1205*crLHS195;
rLHS(34,34)+=gauss_weight*(crLHS1157*kappa + crLHS1158*kappa + crLHS1159*kappa - crLHS1161*dp_th_dt + crLHS1189 - crLHS1201*crLHS564 - crLHS1202*crLHS564 + crLHS1203*crLHS564 - crLHS1204*crLHS564 + crLHS365*crLHS384);
rLHS(34,35)+=0;
rLHS(34,36)+=crLHS1206;
rLHS(34,37)+=crLHS1207;
rLHS(34,38)+=crLHS1208;
rLHS(34,39)+=gauss_weight*(-crLHS1201*crLHS570 - crLHS1202*crLHS570 + crLHS1203*crLHS570 - crLHS1204*crLHS570 + crLHS1209 + crLHS365*crLHS411);
rLHS(35,0)+=crLHS143;
rLHS(35,1)+=crLHS10*(crLHS146 + crLHS22*r_DN(7,0) + crLHS386);
rLHS(35,2)+=crLHS10*(crLHS153 + crLHS22*r_DN(7,1) + crLHS477);
rLHS(35,3)+=crLHS10*(crLHS155 + crLHS22*r_DN(7,2) + crLHS515);
rLHS(35,4)+=crLHS157;
rLHS(35,5)+=crLHS641;
rLHS(35,6)+=crLHS10*(crLHS41*r_DN(7,0) + crLHS644 + crLHS682);
rLHS(35,7)+=crLHS10*(crLHS41*r_DN(7,1) + crLHS646 + crLHS693);
rLHS(35,8)+=crLHS10*(crLHS41*r_DN(7,2) + crLHS648 + crLHS701);
rLHS(35,9)+=crLHS649;
rLHS(35,10)+=crLHS788;
rLHS(35,11)+=crLHS10*(crLHS61*r_DN(7,0) + crLHS791 + crLHS826);
rLHS(35,12)+=crLHS10*(crLHS61*r_DN(7,1) + crLHS793 + crLHS836);
rLHS(35,13)+=crLHS10*(crLHS61*r_DN(7,2) + crLHS795 + crLHS843);
rLHS(35,14)+=crLHS796;
rLHS(35,15)+=crLHS914;
rLHS(35,16)+=crLHS10*(crLHS79*r_DN(7,0) + crLHS917 + crLHS949);
rLHS(35,17)+=crLHS10*(crLHS79*r_DN(7,1) + crLHS919 + crLHS958);
rLHS(35,18)+=crLHS10*(crLHS79*r_DN(7,2) + crLHS921 + crLHS964);
rLHS(35,19)+=crLHS922;
rLHS(35,20)+=crLHS1019;
rLHS(35,21)+=crLHS10*(crLHS1022 + crLHS1051 + crLHS97*r_DN(7,0));
rLHS(35,22)+=crLHS10*(crLHS1024 + crLHS1059 + crLHS97*r_DN(7,1));
rLHS(35,23)+=crLHS10*(crLHS1026 + crLHS1064 + crLHS97*r_DN(7,2));
rLHS(35,24)+=crLHS1027;
rLHS(35,25)+=crLHS1103;
rLHS(35,26)+=crLHS10*(crLHS1106 + crLHS1132 + crLHS115*r_DN(7,0));
rLHS(35,27)+=crLHS10*(crLHS1108 + crLHS1139 + crLHS115*r_DN(7,1));
rLHS(35,28)+=crLHS10*(crLHS1110 + crLHS1143 + crLHS115*r_DN(7,2));
rLHS(35,29)+=crLHS1111;
rLHS(35,30)+=crLHS1165;
rLHS(35,31)+=crLHS10*(crLHS1168 + crLHS1191 + crLHS133*r_DN(7,0));
rLHS(35,32)+=crLHS10*(crLHS1170 + crLHS1197 + crLHS133*r_DN(7,1));
rLHS(35,33)+=crLHS10*(crLHS1172 + crLHS1200 + crLHS133*r_DN(7,2));
rLHS(35,34)+=crLHS1173;
rLHS(35,35)+=crLHS11*(crLHS1210 + crLHS1211 + crLHS1212);
rLHS(35,36)+=crLHS10*(-crLHS12*crLHS1214 + crLHS151*r_DN(7,0) + r_DN(7,0)*r_N[7]);
rLHS(35,37)+=crLHS10*(-crLHS1214*crLHS23 + crLHS151*r_DN(7,1) + r_DN(7,1)*r_N[7]);
rLHS(35,38)+=crLHS10*(-crLHS1214*crLHS24 + crLHS151*r_DN(7,2) + r_DN(7,2)*r_N[7]);
rLHS(35,39)+=-crLHS1213*crLHS28;
rLHS(36,0)+=gauss_weight*(-crLHS1215*r_DN(0,0) - crLHS144 + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,0)*r_N[7]*tau_u - crLHS206*crLHS386);
rLHS(36,1)+=gauss_weight*(crLHS1216*crLHS171 + crLHS1222 + crLHS164*r_DN(7,0) + crLHS166*r_DN(7,1) + crLHS168*r_DN(7,2));
rLHS(36,2)+=gauss_weight*(crLHS1216*crLHS189 + crLHS181*r_DN(7,0) + crLHS183*r_DN(7,1) + crLHS186*r_DN(7,2));
rLHS(36,3)+=gauss_weight*(crLHS1216*crLHS197 + crLHS190*r_DN(7,0) + crLHS192*r_DN(7,1) + crLHS194*r_DN(7,2));
rLHS(36,4)+=-crLHS1223*crLHS202;
rLHS(36,5)+=gauss_weight*(-crLHS1215*r_DN(1,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,0)*r_N[7]*tau_u - crLHS206*crLHS682 - crLHS642);
rLHS(36,6)+=gauss_weight*(crLHS1216*crLHS214 + crLHS1224 + crLHS207*r_DN(7,0) + crLHS209*r_DN(7,1) + crLHS211*r_DN(7,2));
rLHS(36,7)+=gauss_weight*(crLHS1216*crLHS226 + crLHS219*r_DN(7,0) + crLHS221*r_DN(7,1) + crLHS224*r_DN(7,2));
rLHS(36,8)+=gauss_weight*(crLHS1216*crLHS233 + crLHS227*r_DN(7,0) + crLHS229*r_DN(7,1) + crLHS231*r_DN(7,2));
rLHS(36,9)+=-crLHS1223*crLHS235;
rLHS(36,10)+=gauss_weight*(-crLHS1215*r_DN(2,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,0)*r_N[7]*tau_u - crLHS206*crLHS826 - crLHS789);
rLHS(36,11)+=gauss_weight*(crLHS1216*crLHS244 + crLHS1225 + crLHS237*r_DN(7,0) + crLHS239*r_DN(7,1) + crLHS241*r_DN(7,2));
rLHS(36,12)+=gauss_weight*(crLHS1216*crLHS256 + crLHS249*r_DN(7,0) + crLHS251*r_DN(7,1) + crLHS254*r_DN(7,2));
rLHS(36,13)+=gauss_weight*(crLHS1216*crLHS263 + crLHS257*r_DN(7,0) + crLHS259*r_DN(7,1) + crLHS261*r_DN(7,2));
rLHS(36,14)+=-crLHS1223*crLHS265;
rLHS(36,15)+=gauss_weight*(-crLHS1215*r_DN(3,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,0)*r_N[7]*tau_u - crLHS206*crLHS949 - crLHS915);
rLHS(36,16)+=gauss_weight*(crLHS1216*crLHS274 + crLHS1226 + crLHS267*r_DN(7,0) + crLHS269*r_DN(7,1) + crLHS271*r_DN(7,2));
rLHS(36,17)+=gauss_weight*(crLHS1216*crLHS286 + crLHS279*r_DN(7,0) + crLHS281*r_DN(7,1) + crLHS284*r_DN(7,2));
rLHS(36,18)+=gauss_weight*(crLHS1216*crLHS293 + crLHS287*r_DN(7,0) + crLHS289*r_DN(7,1) + crLHS291*r_DN(7,2));
rLHS(36,19)+=-crLHS1223*crLHS295;
rLHS(36,20)+=gauss_weight*(-crLHS1020 - crLHS1051*crLHS206 - crLHS1215*r_DN(4,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,0)*r_N[7]*tau_u);
rLHS(36,21)+=gauss_weight*(crLHS1216*crLHS304 + crLHS1227 + crLHS297*r_DN(7,0) + crLHS299*r_DN(7,1) + crLHS301*r_DN(7,2));
rLHS(36,22)+=gauss_weight*(crLHS1216*crLHS316 + crLHS309*r_DN(7,0) + crLHS311*r_DN(7,1) + crLHS314*r_DN(7,2));
rLHS(36,23)+=gauss_weight*(crLHS1216*crLHS323 + crLHS317*r_DN(7,0) + crLHS319*r_DN(7,1) + crLHS321*r_DN(7,2));
rLHS(36,24)+=-crLHS1223*crLHS325;
rLHS(36,25)+=gauss_weight*(-crLHS1104 - crLHS1132*crLHS206 - crLHS1215*r_DN(5,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,0)*r_N[7]*tau_u);
rLHS(36,26)+=gauss_weight*(crLHS1216*crLHS334 + crLHS1228 + crLHS327*r_DN(7,0) + crLHS329*r_DN(7,1) + crLHS331*r_DN(7,2));
rLHS(36,27)+=gauss_weight*(crLHS1216*crLHS346 + crLHS339*r_DN(7,0) + crLHS341*r_DN(7,1) + crLHS344*r_DN(7,2));
rLHS(36,28)+=gauss_weight*(crLHS1216*crLHS353 + crLHS347*r_DN(7,0) + crLHS349*r_DN(7,1) + crLHS351*r_DN(7,2));
rLHS(36,29)+=-crLHS1223*crLHS355;
rLHS(36,30)+=gauss_weight*(-crLHS1166 - crLHS1191*crLHS206 - crLHS1215*r_DN(6,0) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,0)*r_N[7]*tau_u);
rLHS(36,31)+=gauss_weight*(crLHS1216*crLHS364 + crLHS1229 + crLHS357*r_DN(7,0) + crLHS359*r_DN(7,1) + crLHS361*r_DN(7,2));
rLHS(36,32)+=gauss_weight*(crLHS1216*crLHS376 + crLHS369*r_DN(7,0) + crLHS371*r_DN(7,1) + crLHS374*r_DN(7,2));
rLHS(36,33)+=gauss_weight*(crLHS1216*crLHS383 + crLHS377*r_DN(7,0) + crLHS379*r_DN(7,1) + crLHS381*r_DN(7,2));
rLHS(36,34)+=-crLHS1223*crLHS385;
rLHS(36,35)+=crLHS1230*r_DN(7,0);
rLHS(36,36)+=gauss_weight*(crLHS1216*crLHS393 + crLHS1232 + crLHS387*r_DN(7,0) + crLHS389*r_DN(7,1) + crLHS391*r_DN(7,2));
rLHS(36,37)+=gauss_weight*(crLHS1216*crLHS404 + crLHS398*r_DN(7,0) + crLHS400*r_DN(7,1) + crLHS403*r_DN(7,2));
rLHS(36,38)+=gauss_weight*(crLHS1216*crLHS410 + crLHS405*r_DN(7,0) + crLHS407*r_DN(7,1) + crLHS409*r_DN(7,2));
rLHS(36,39)+=-crLHS1223*crLHS412;
rLHS(37,0)+=gauss_weight*(-crLHS1215*r_DN(0,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*tau_u - crLHS152 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,1)*r_N[7]*tau_u - crLHS206*crLHS477);
rLHS(37,1)+=gauss_weight*(crLHS1233*crLHS171 + crLHS166*r_DN(7,0) + crLHS413*r_DN(7,1) + crLHS414*r_DN(7,2));
rLHS(37,2)+=gauss_weight*(crLHS1222 + crLHS1233*crLHS189 + crLHS183*r_DN(7,0) + crLHS416*r_DN(7,1) + crLHS418*r_DN(7,2));
rLHS(37,3)+=gauss_weight*(crLHS1233*crLHS197 + crLHS192*r_DN(7,0) + crLHS419*r_DN(7,1) + crLHS421*r_DN(7,2));
rLHS(37,4)+=-crLHS1234*crLHS202;
rLHS(37,5)+=gauss_weight*(-crLHS1215*r_DN(1,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,1)*r_N[7]*tau_u - crLHS206*crLHS693 - crLHS645);
rLHS(37,6)+=gauss_weight*(crLHS1233*crLHS214 + crLHS209*r_DN(7,0) + crLHS424*r_DN(7,1) + crLHS425*r_DN(7,2));
rLHS(37,7)+=gauss_weight*(crLHS1224 + crLHS1233*crLHS226 + crLHS221*r_DN(7,0) + crLHS426*r_DN(7,1) + crLHS428*r_DN(7,2));
rLHS(37,8)+=gauss_weight*(crLHS1233*crLHS233 + crLHS229*r_DN(7,0) + crLHS429*r_DN(7,1) + crLHS431*r_DN(7,2));
rLHS(37,9)+=-crLHS1234*crLHS235;
rLHS(37,10)+=gauss_weight*(-crLHS1215*r_DN(2,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,1)*r_N[7]*tau_u - crLHS206*crLHS836 - crLHS792);
rLHS(37,11)+=gauss_weight*(crLHS1233*crLHS244 + crLHS239*r_DN(7,0) + crLHS433*r_DN(7,1) + crLHS434*r_DN(7,2));
rLHS(37,12)+=gauss_weight*(crLHS1225 + crLHS1233*crLHS256 + crLHS251*r_DN(7,0) + crLHS435*r_DN(7,1) + crLHS437*r_DN(7,2));
rLHS(37,13)+=gauss_weight*(crLHS1233*crLHS263 + crLHS259*r_DN(7,0) + crLHS438*r_DN(7,1) + crLHS440*r_DN(7,2));
rLHS(37,14)+=-crLHS1234*crLHS265;
rLHS(37,15)+=gauss_weight*(-crLHS1215*r_DN(3,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,1)*r_N[7]*tau_u - crLHS206*crLHS958 - crLHS918);
rLHS(37,16)+=gauss_weight*(crLHS1233*crLHS274 + crLHS269*r_DN(7,0) + crLHS442*r_DN(7,1) + crLHS443*r_DN(7,2));
rLHS(37,17)+=gauss_weight*(crLHS1226 + crLHS1233*crLHS286 + crLHS281*r_DN(7,0) + crLHS444*r_DN(7,1) + crLHS446*r_DN(7,2));
rLHS(37,18)+=gauss_weight*(crLHS1233*crLHS293 + crLHS289*r_DN(7,0) + crLHS447*r_DN(7,1) + crLHS449*r_DN(7,2));
rLHS(37,19)+=-crLHS1234*crLHS295;
rLHS(37,20)+=gauss_weight*(-crLHS1023 - crLHS1059*crLHS206 - crLHS1215*r_DN(4,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,1)*r_N[7]*tau_u);
rLHS(37,21)+=gauss_weight*(crLHS1233*crLHS304 + crLHS299*r_DN(7,0) + crLHS451*r_DN(7,1) + crLHS452*r_DN(7,2));
rLHS(37,22)+=gauss_weight*(crLHS1227 + crLHS1233*crLHS316 + crLHS311*r_DN(7,0) + crLHS453*r_DN(7,1) + crLHS455*r_DN(7,2));
rLHS(37,23)+=gauss_weight*(crLHS1233*crLHS323 + crLHS319*r_DN(7,0) + crLHS456*r_DN(7,1) + crLHS458*r_DN(7,2));
rLHS(37,24)+=-crLHS1234*crLHS325;
rLHS(37,25)+=gauss_weight*(-crLHS1107 - crLHS1139*crLHS206 - crLHS1215*r_DN(5,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,1)*r_N[7]*tau_u);
rLHS(37,26)+=gauss_weight*(crLHS1233*crLHS334 + crLHS329*r_DN(7,0) + crLHS460*r_DN(7,1) + crLHS461*r_DN(7,2));
rLHS(37,27)+=gauss_weight*(crLHS1228 + crLHS1233*crLHS346 + crLHS341*r_DN(7,0) + crLHS462*r_DN(7,1) + crLHS464*r_DN(7,2));
rLHS(37,28)+=gauss_weight*(crLHS1233*crLHS353 + crLHS349*r_DN(7,0) + crLHS465*r_DN(7,1) + crLHS467*r_DN(7,2));
rLHS(37,29)+=-crLHS1234*crLHS355;
rLHS(37,30)+=gauss_weight*(-crLHS1169 - crLHS1197*crLHS206 - crLHS1215*r_DN(6,1) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,1)*r_N[7]*tau_u);
rLHS(37,31)+=gauss_weight*(crLHS1233*crLHS364 + crLHS359*r_DN(7,0) + crLHS469*r_DN(7,1) + crLHS470*r_DN(7,2));
rLHS(37,32)+=gauss_weight*(crLHS1229 + crLHS1233*crLHS376 + crLHS371*r_DN(7,0) + crLHS471*r_DN(7,1) + crLHS473*r_DN(7,2));
rLHS(37,33)+=gauss_weight*(crLHS1233*crLHS383 + crLHS379*r_DN(7,0) + crLHS474*r_DN(7,1) + crLHS476*r_DN(7,2));
rLHS(37,34)+=-crLHS1234*crLHS385;
rLHS(37,35)+=crLHS1230*r_DN(7,1);
rLHS(37,36)+=gauss_weight*(crLHS1233*crLHS393 + crLHS389*r_DN(7,0) + crLHS478*r_DN(7,1) + crLHS479*r_DN(7,2));
rLHS(37,37)+=gauss_weight*(crLHS1232 + crLHS1233*crLHS404 + crLHS400*r_DN(7,0) + crLHS480*r_DN(7,1) + crLHS482*r_DN(7,2));
rLHS(37,38)+=gauss_weight*(crLHS1233*crLHS410 + crLHS407*r_DN(7,0) + crLHS483*r_DN(7,1) + crLHS485*r_DN(7,2));
rLHS(37,39)+=-crLHS1234*crLHS412;
rLHS(38,0)+=gauss_weight*(-crLHS1215*r_DN(0,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*tau_u - crLHS154 + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(0,2)*r_N[7]*tau_u - crLHS206*crLHS515);
rLHS(38,1)+=gauss_weight*(crLHS1235*crLHS171 + crLHS168*r_DN(7,0) + crLHS414*r_DN(7,1) + crLHS486*r_DN(7,2));
rLHS(38,2)+=gauss_weight*(crLHS1235*crLHS189 + crLHS186*r_DN(7,0) + crLHS418*r_DN(7,1) + crLHS488*r_DN(7,2));
rLHS(38,3)+=gauss_weight*(crLHS1222 + crLHS1235*crLHS197 + crLHS194*r_DN(7,0) + crLHS421*r_DN(7,1) + crLHS489*r_DN(7,2));
rLHS(38,4)+=-crLHS1236*crLHS202;
rLHS(38,5)+=gauss_weight*(-crLHS1215*r_DN(1,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(1,2)*r_N[7]*tau_u - crLHS206*crLHS701 - crLHS647);
rLHS(38,6)+=gauss_weight*(crLHS1235*crLHS214 + crLHS211*r_DN(7,0) + crLHS425*r_DN(7,1) + crLHS492*r_DN(7,2));
rLHS(38,7)+=gauss_weight*(crLHS1235*crLHS226 + crLHS224*r_DN(7,0) + crLHS428*r_DN(7,1) + crLHS493*r_DN(7,2));
rLHS(38,8)+=gauss_weight*(crLHS1224 + crLHS1235*crLHS233 + crLHS231*r_DN(7,0) + crLHS431*r_DN(7,1) + crLHS494*r_DN(7,2));
rLHS(38,9)+=-crLHS1236*crLHS235;
rLHS(38,10)+=gauss_weight*(-crLHS1215*r_DN(2,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(2,2)*r_N[7]*tau_u - crLHS206*crLHS843 - crLHS794);
rLHS(38,11)+=gauss_weight*(crLHS1235*crLHS244 + crLHS241*r_DN(7,0) + crLHS434*r_DN(7,1) + crLHS496*r_DN(7,2));
rLHS(38,12)+=gauss_weight*(crLHS1235*crLHS256 + crLHS254*r_DN(7,0) + crLHS437*r_DN(7,1) + crLHS497*r_DN(7,2));
rLHS(38,13)+=gauss_weight*(crLHS1225 + crLHS1235*crLHS263 + crLHS261*r_DN(7,0) + crLHS440*r_DN(7,1) + crLHS498*r_DN(7,2));
rLHS(38,14)+=-crLHS1236*crLHS265;
rLHS(38,15)+=gauss_weight*(-crLHS1215*r_DN(3,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(3,2)*r_N[7]*tau_u - crLHS206*crLHS964 - crLHS920);
rLHS(38,16)+=gauss_weight*(crLHS1235*crLHS274 + crLHS271*r_DN(7,0) + crLHS443*r_DN(7,1) + crLHS500*r_DN(7,2));
rLHS(38,17)+=gauss_weight*(crLHS1235*crLHS286 + crLHS284*r_DN(7,0) + crLHS446*r_DN(7,1) + crLHS501*r_DN(7,2));
rLHS(38,18)+=gauss_weight*(crLHS1226 + crLHS1235*crLHS293 + crLHS291*r_DN(7,0) + crLHS449*r_DN(7,1) + crLHS502*r_DN(7,2));
rLHS(38,19)+=-crLHS1236*crLHS295;
rLHS(38,20)+=gauss_weight*(-crLHS1025 - crLHS1064*crLHS206 - crLHS1215*r_DN(4,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(4,2)*r_N[7]*tau_u);
rLHS(38,21)+=gauss_weight*(crLHS1235*crLHS304 + crLHS301*r_DN(7,0) + crLHS452*r_DN(7,1) + crLHS504*r_DN(7,2));
rLHS(38,22)+=gauss_weight*(crLHS1235*crLHS316 + crLHS314*r_DN(7,0) + crLHS455*r_DN(7,1) + crLHS505*r_DN(7,2));
rLHS(38,23)+=gauss_weight*(crLHS1227 + crLHS1235*crLHS323 + crLHS321*r_DN(7,0) + crLHS458*r_DN(7,1) + crLHS506*r_DN(7,2));
rLHS(38,24)+=-crLHS1236*crLHS325;
rLHS(38,25)+=gauss_weight*(-crLHS1109 - crLHS1143*crLHS206 - crLHS1215*r_DN(5,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(5,2)*r_N[7]*tau_u);
rLHS(38,26)+=gauss_weight*(crLHS1235*crLHS334 + crLHS331*r_DN(7,0) + crLHS461*r_DN(7,1) + crLHS508*r_DN(7,2));
rLHS(38,27)+=gauss_weight*(crLHS1235*crLHS346 + crLHS344*r_DN(7,0) + crLHS464*r_DN(7,1) + crLHS509*r_DN(7,2));
rLHS(38,28)+=gauss_weight*(crLHS1228 + crLHS1235*crLHS353 + crLHS351*r_DN(7,0) + crLHS467*r_DN(7,1) + crLHS510*r_DN(7,2));
rLHS(38,29)+=-crLHS1236*crLHS355;
rLHS(38,30)+=gauss_weight*(-crLHS1171 - crLHS1200*crLHS206 - crLHS1215*r_DN(6,2) + crLHS149*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*tau_u + crLHS159*crLHS3*crLHS6*crLHS7*gamma*p_th*r_DN(6,2)*r_N[7]*tau_u);
rLHS(38,31)+=gauss_weight*(crLHS1235*crLHS364 + crLHS361*r_DN(7,0) + crLHS470*r_DN(7,1) + crLHS512*r_DN(7,2));
rLHS(38,32)+=gauss_weight*(crLHS1235*crLHS376 + crLHS374*r_DN(7,0) + crLHS473*r_DN(7,1) + crLHS513*r_DN(7,2));
rLHS(38,33)+=gauss_weight*(crLHS1229 + crLHS1235*crLHS383 + crLHS381*r_DN(7,0) + crLHS476*r_DN(7,1) + crLHS514*r_DN(7,2));
rLHS(38,34)+=-crLHS1236*crLHS385;
rLHS(38,35)+=crLHS1230*r_DN(7,2);
rLHS(38,36)+=gauss_weight*(crLHS1235*crLHS393 + crLHS391*r_DN(7,0) + crLHS479*r_DN(7,1) + crLHS516*r_DN(7,2));
rLHS(38,37)+=gauss_weight*(crLHS1235*crLHS404 + crLHS403*r_DN(7,0) + crLHS482*r_DN(7,1) + crLHS517*r_DN(7,2));
rLHS(38,38)+=gauss_weight*(crLHS1232 + crLHS1235*crLHS410 + crLHS409*r_DN(7,0) + crLHS485*r_DN(7,1) + crLHS518*r_DN(7,2));
rLHS(38,39)+=-crLHS1236*crLHS412;
rLHS(39,0)+=0;
rLHS(39,1)+=crLHS566;
rLHS(39,2)+=crLHS567;
rLHS(39,3)+=crLHS568;
rLHS(39,4)+=gauss_weight*(-crLHS1237*crLHS521 - crLHS1238*crLHS521 + crLHS1239*crLHS521 - crLHS1240*crLHS521 + crLHS201*crLHS394 + crLHS571);
rLHS(39,5)+=0;
rLHS(39,6)+=crLHS727;
rLHS(39,7)+=crLHS728;
rLHS(39,8)+=crLHS729;
rLHS(39,9)+=gauss_weight*(-crLHS1237*crLHS534 - crLHS1238*crLHS534 + crLHS1239*crLHS534 - crLHS1240*crLHS534 + crLHS234*crLHS394 + crLHS730);
rLHS(39,10)+=0;
rLHS(39,11)+=crLHS865;
rLHS(39,12)+=crLHS866;
rLHS(39,13)+=crLHS867;
rLHS(39,14)+=gauss_weight*(-crLHS1237*crLHS540 - crLHS1238*crLHS540 + crLHS1239*crLHS540 - crLHS1240*crLHS540 + crLHS264*crLHS394 + crLHS868);
rLHS(39,15)+=0;
rLHS(39,16)+=crLHS982;
rLHS(39,17)+=crLHS983;
rLHS(39,18)+=crLHS984;
rLHS(39,19)+=gauss_weight*(-crLHS1237*crLHS546 - crLHS1238*crLHS546 + crLHS1239*crLHS546 - crLHS1240*crLHS546 + crLHS294*crLHS394 + crLHS985);
rLHS(39,20)+=0;
rLHS(39,21)+=crLHS1078;
rLHS(39,22)+=crLHS1079;
rLHS(39,23)+=crLHS1080;
rLHS(39,24)+=gauss_weight*(crLHS1081 - crLHS1237*crLHS552 - crLHS1238*crLHS552 + crLHS1239*crLHS552 - crLHS1240*crLHS552 + crLHS324*crLHS394);
rLHS(39,25)+=0;
rLHS(39,26)+=crLHS1153;
rLHS(39,27)+=crLHS1154;
rLHS(39,28)+=crLHS1155;
rLHS(39,29)+=gauss_weight*(crLHS1156 - crLHS1237*crLHS558 - crLHS1238*crLHS558 + crLHS1239*crLHS558 - crLHS1240*crLHS558 + crLHS354*crLHS394);
rLHS(39,30)+=0;
rLHS(39,31)+=crLHS1206;
rLHS(39,32)+=crLHS1207;
rLHS(39,33)+=crLHS1208;
rLHS(39,34)+=gauss_weight*(crLHS1209 - crLHS1237*crLHS564 - crLHS1238*crLHS564 + crLHS1239*crLHS564 - crLHS1240*crLHS564 + crLHS384*crLHS394);
rLHS(39,35)+=0;
rLHS(39,36)+=crLHS1241*crLHS169;
rLHS(39,37)+=crLHS1241*crLHS187;
rLHS(39,38)+=crLHS1241*crLHS195;
rLHS(39,39)+=gauss_weight*(crLHS1210*kappa + crLHS1211*kappa + crLHS1212*kappa - crLHS1214*dp_th_dt + crLHS1231 - crLHS1237*crLHS570 - crLHS1238*crLHS570 + crLHS1239*crLHS570 - crLHS1240*crLHS570 + crLHS394*crLHS411);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<2,3>>::ComputeGaussPointRHSContribution(
    LowMachNavierStokesData<2,3>& rData,
    VectorType& rRHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_stress = rData.ShearStress;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;
    const double bdf1 = rData.bdf1;
    const double bdf2 = rData.bdf2;

    // Nodal data
    const auto& r_p = rData.Pressure;
    const auto& r_u = rData.Velocity;
    const auto& r_u_n = rData.VelocityOldStep1;
    const auto& r_u_nn = rData.VelocityOldStep2;
    const auto& r_t = rData.Temperature;
    const auto& r_t_n = rData.TemperatureOldStep1;
    const auto& r_t_nn = rData.TemperatureOldStep2;
    const auto& r_g = rData.BodyForce;
    const auto& r_heat_fl = rData.HeatFlux;
    const auto& r_u_sol_frac = rData.SolidFractionVelocity;

    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double, 2, 3> lin_u_conv = r_u - r_u_mesh;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add RHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crRHS0 = r_DN(0,0)*r_u(0,0) + r_DN(1,0)*r_u(1,0) + r_DN(2,0)*r_u(2,0);
const double crRHS1 = r_DN(0,1)*r_u(0,1) + r_DN(1,1)*r_u(1,1) + r_DN(2,1)*r_u(2,1);
const double crRHS2 = p_th*(crRHS0 + crRHS1);
const double crRHS3 = r_N[0]*(bdf0*r_t[0] + bdf1*r_t_n[0] + bdf2*r_t_nn[0]) + r_N[1]*(bdf0*r_t[1] + bdf1*r_t_n[1] + bdf2*r_t_nn[1]) + r_N[2]*(bdf0*r_t[2] + bdf1*r_t_n[2] + bdf2*r_t_nn[2]);
const double crRHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2];
const double crRHS5 = 1.0/crRHS4;
const double crRHS6 = crRHS5*p_th;
const double crRHS7 = crRHS3*crRHS6;
const double crRHS8 = -crRHS7 + dp_th_dt;
const double crRHS9 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2];
const double crRHS10 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0));
const double crRHS11 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2];
const double crRHS12 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1));
const double crRHS13 = crRHS6*(crRHS10*crRHS9 + crRHS11*crRHS12);
const double crRHS14 = sigma*(r_N[0]*r_u(0,0) - r_N[0]*r_u_sol_frac(0,0) + r_N[1]*r_u(1,0) - r_N[1]*r_u_sol_frac(1,0) + r_N[2]*r_u(2,0) - r_N[2]*r_u_sol_frac(2,0));
const double crRHS15 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2];
const double crRHS16 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2];
const double crRHS17 = crRHS0*crRHS15 + crRHS16*(r_DN(0,1)*r_u(0,0) + r_DN(1,1)*r_u(1,0) + r_DN(2,1)*r_u(2,0));
const double crRHS18 = r_N[0]*(bdf0*r_u(0,0) + bdf1*r_u_n(0,0) + bdf2*r_u_nn(0,0)) + r_N[1]*(bdf0*r_u(1,0) + bdf1*r_u_n(1,0) + bdf2*r_u_nn(1,0)) + r_N[2]*(bdf0*r_u(2,0) + bdf1*r_u_n(2,0) + bdf2*r_u_nn(2,0));
const double crRHS19 = 1.0/c_p;
const double crRHS20 = gamma/(gamma - 1.0);
const double crRHS21 = crRHS20*crRHS6;
const double crRHS22 = crRHS19*crRHS21;
const double crRHS23 = crRHS14 - crRHS22*(-crRHS17 - crRHS18 + r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0)) + r_DN(0,0)*r_p[0] + r_DN(1,0)*r_p[1] + r_DN(2,0)*r_p[2];
const double crRHS24 = p_th*tau_u;
const double crRHS25 = crRHS23*crRHS24;
const double crRHS26 = sigma*(r_N[0]*r_u(0,1) - r_N[0]*r_u_sol_frac(0,1) + r_N[1]*r_u(1,1) - r_N[1]*r_u_sol_frac(1,1) + r_N[2]*r_u(2,1) - r_N[2]*r_u_sol_frac(2,1));
const double crRHS27 = crRHS1*crRHS16 + crRHS15*(r_DN(0,0)*r_u(0,1) + r_DN(1,0)*r_u(1,1) + r_DN(2,0)*r_u(2,1));
const double crRHS28 = r_N[0]*(bdf0*r_u(0,1) + bdf1*r_u_n(0,1) + bdf2*r_u_nn(0,1)) + r_N[1]*(bdf0*r_u(1,1) + bdf1*r_u_n(1,1) + bdf2*r_u_nn(1,1)) + r_N[2]*(bdf0*r_u(2,1) + bdf1*r_u_n(2,1) + bdf2*r_u_nn(2,1));
const double crRHS29 = -crRHS22*(-crRHS27 - crRHS28 + r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1)) + crRHS26 + r_DN(0,1)*r_p[0] + r_DN(1,1)*r_p[1] + r_DN(2,1)*r_p[2];
const double crRHS30 = crRHS24*crRHS29;
const double crRHS31 = crRHS19*crRHS20;
const double crRHS32 = crRHS31*crRHS5;
const double crRHS33 = crRHS32*gauss_weight;
const double crRHS34 = r_N[0]*r_p[0] + r_N[1]*r_p[1] + r_N[2]*r_p[2];
const double crRHS35 = r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0);
const double crRHS36 = crRHS22*r_N[0];
const double crRHS37 = sigma*tau_u;
const double crRHS38 = crRHS37*r_N[0];
const double crRHS39 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2];
const double crRHS40 = crRHS10*crRHS39;
const double crRHS41 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2];
const double crRHS42 = crRHS12*crRHS41;
const double crRHS43 = crRHS32*tau_c*(-crRHS2 + crRHS40*crRHS6 + crRHS42*crRHS6 + crRHS7 - dp_th_dt);
const double crRHS44 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1);
const double crRHS45 = crRHS44*tau_u;
const double crRHS46 = crRHS36*crRHS45;
const double crRHS47 = crRHS15*r_DN(0,0) + crRHS16*r_DN(0,1);
const double crRHS48 = crRHS22*tau_u;
const double crRHS49 = crRHS47*crRHS48;
const double crRHS50 = (crRHS11*crRHS16 + crRHS15*crRHS9)*1.0/(crRHS4*crRHS4);
const double crRHS51 = crRHS50*r_N[0];
const double crRHS52 = crRHS31*crRHS51;
const double crRHS53 = r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1);
const double crRHS54 = r_N[0]*r_heat_fl[0] + r_N[1]*r_heat_fl[1] + r_N[2]*r_heat_fl[2];
const double crRHS55 = crRHS39*kappa;
const double crRHS56 = crRHS41*kappa;
const double crRHS57 = crRHS5*dp_th_dt;
const double crRHS58 = crRHS57*(r_N[0]*r_t[0] + r_N[1]*r_t[1] + r_N[2]*r_t[2]);
const double crRHS59 = crRHS20*crRHS7;
const double crRHS60 = crRHS21*(crRHS40 + crRHS42);
const double crRHS61 = tau_t*(-crRHS21*(crRHS15*crRHS39 + crRHS16*crRHS41 + crRHS3) + crRHS54 + crRHS58);
const double crRHS62 = crRHS57*crRHS61;
const double crRHS63 = crRHS21*crRHS61;
const double crRHS64 = crRHS44*crRHS63;
const double crRHS65 = crRHS20*crRHS61*p_th;
const double crRHS66 = crRHS22*r_N[1];
const double crRHS67 = crRHS37*r_N[1];
const double crRHS68 = crRHS45*crRHS66;
const double crRHS69 = crRHS15*r_DN(1,0) + crRHS16*r_DN(1,1);
const double crRHS70 = crRHS48*crRHS69;
const double crRHS71 = crRHS31*crRHS50;
const double crRHS72 = crRHS71*r_N[1];
const double crRHS73 = crRHS50*crRHS65;
const double crRHS74 = crRHS22*r_N[2];
const double crRHS75 = crRHS37*r_N[2];
const double crRHS76 = crRHS45*crRHS74;
const double crRHS77 = crRHS15*r_DN(2,0) + crRHS16*r_DN(2,1);
const double crRHS78 = crRHS48*crRHS77;
const double crRHS79 = crRHS71*r_N[2];
rRHS[0]+=-crRHS33*(-crRHS13*r_N[0] + crRHS2*r_N[0] + crRHS25*r_DN(0,0) + crRHS30*r_DN(0,1) + crRHS8*r_N[0]);
rRHS[1]+=-gauss_weight*(crRHS14*r_N[0] + crRHS17*crRHS36 + crRHS18*crRHS36 - crRHS23*crRHS38 + crRHS23*crRHS46 + crRHS23*crRHS49 - crRHS25*crRHS52 - crRHS34*r_DN(0,0) - crRHS35*crRHS36 - crRHS43*r_DN(0,0) + r_DN(0,0)*r_stress[0] + r_DN(0,1)*r_stress[2]);
rRHS[2]+=-gauss_weight*(crRHS26*r_N[0] + crRHS27*crRHS36 + crRHS28*crRHS36 - crRHS29*crRHS38 + crRHS29*crRHS46 + crRHS29*crRHS49 - crRHS30*crRHS52 - crRHS34*r_DN(0,1) - crRHS36*crRHS53 - crRHS43*r_DN(0,1) + r_DN(0,0)*r_stress[2] + r_DN(0,1)*r_stress[1]);
rRHS[3]+=gauss_weight*(crRHS47*crRHS63 - crRHS51*crRHS65 + crRHS54*r_N[0] - crRHS55*r_DN(0,0) - crRHS56*r_DN(0,1) + crRHS58*r_N[0] - crRHS59*r_N[0] - crRHS60*r_N[0] + crRHS62*r_N[0] + crRHS64*r_N[0]);
rRHS[4]+=-crRHS33*(-crRHS13*r_N[1] + crRHS2*r_N[1] + crRHS25*r_DN(1,0) + crRHS30*r_DN(1,1) + crRHS8*r_N[1]);
rRHS[5]+=-gauss_weight*(crRHS14*r_N[1] + crRHS17*crRHS66 + crRHS18*crRHS66 - crRHS23*crRHS67 + crRHS23*crRHS68 + crRHS23*crRHS70 - crRHS25*crRHS72 - crRHS34*r_DN(1,0) - crRHS35*crRHS66 - crRHS43*r_DN(1,0) + r_DN(1,0)*r_stress[0] + r_DN(1,1)*r_stress[2]);
rRHS[6]+=-gauss_weight*(crRHS26*r_N[1] + crRHS27*crRHS66 + crRHS28*crRHS66 - crRHS29*crRHS67 + crRHS29*crRHS68 + crRHS29*crRHS70 - crRHS30*crRHS72 - crRHS34*r_DN(1,1) - crRHS43*r_DN(1,1) - crRHS53*crRHS66 + r_DN(1,0)*r_stress[2] + r_DN(1,1)*r_stress[1]);
rRHS[7]+=gauss_weight*(crRHS54*r_N[1] - crRHS55*r_DN(1,0) - crRHS56*r_DN(1,1) + crRHS58*r_N[1] - crRHS59*r_N[1] - crRHS60*r_N[1] + crRHS62*r_N[1] + crRHS63*crRHS69 + crRHS64*r_N[1] - crRHS73*r_N[1]);
rRHS[8]+=-crRHS33*(-crRHS13*r_N[2] + crRHS2*r_N[2] + crRHS25*r_DN(2,0) + crRHS30*r_DN(2,1) + crRHS8*r_N[2]);
rRHS[9]+=-gauss_weight*(crRHS14*r_N[2] + crRHS17*crRHS74 + crRHS18*crRHS74 - crRHS23*crRHS75 + crRHS23*crRHS76 + crRHS23*crRHS78 - crRHS25*crRHS79 - crRHS34*r_DN(2,0) - crRHS35*crRHS74 - crRHS43*r_DN(2,0) + r_DN(2,0)*r_stress[0] + r_DN(2,1)*r_stress[2]);
rRHS[10]+=-gauss_weight*(crRHS26*r_N[2] + crRHS27*crRHS74 + crRHS28*crRHS74 - crRHS29*crRHS75 + crRHS29*crRHS76 + crRHS29*crRHS78 - crRHS30*crRHS79 - crRHS34*r_DN(2,1) - crRHS43*r_DN(2,1) - crRHS53*crRHS74 + r_DN(2,0)*r_stress[2] + r_DN(2,1)*r_stress[1]);
rRHS[11]+=gauss_weight*(crRHS54*r_N[2] - crRHS55*r_DN(2,0) - crRHS56*r_DN(2,1) + crRHS58*r_N[2] - crRHS59*r_N[2] - crRHS60*r_N[2] + crRHS62*r_N[2] + crRHS63*crRHS77 + crRHS64*r_N[2] - crRHS73*r_N[2]);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<2,4>>::ComputeGaussPointRHSContribution(
    LowMachNavierStokesData<2,4>& rData,
    VectorType& rRHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_stress = rData.ShearStress;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;
    const double bdf1 = rData.bdf1;
    const double bdf2 = rData.bdf2;

    // Nodal data
    const auto& r_p = rData.Pressure;
    const auto& r_u = rData.Velocity;
    const auto& r_u_n = rData.VelocityOldStep1;
    const auto& r_u_nn = rData.VelocityOldStep2;
    const auto& r_t = rData.Temperature;
    const auto& r_t_n = rData.TemperatureOldStep1;
    const auto& r_t_nn = rData.TemperatureOldStep2;
    const auto& r_g = rData.BodyForce;
    const auto& r_heat_fl = rData.HeatFlux;
    const auto& r_u_sol_frac = rData.SolidFractionVelocity;

    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double, 2, 4> lin_u_conv = r_u - r_u_mesh;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add RHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crRHS0 = r_DN(0,0)*r_u(0,0) + r_DN(1,0)*r_u(1,0) + r_DN(2,0)*r_u(2,0) + r_DN(3,0)*r_u(3,0);
const double crRHS1 = r_DN(0,1)*r_u(0,1) + r_DN(1,1)*r_u(1,1) + r_DN(2,1)*r_u(2,1) + r_DN(3,1)*r_u(3,1);
const double crRHS2 = p_th*(crRHS0 + crRHS1);
const double crRHS3 = r_N[0]*(bdf0*r_t[0] + bdf1*r_t_n[0] + bdf2*r_t_nn[0]) + r_N[1]*(bdf0*r_t[1] + bdf1*r_t_n[1] + bdf2*r_t_nn[1]) + r_N[2]*(bdf0*r_t[2] + bdf1*r_t_n[2] + bdf2*r_t_nn[2]) + r_N[3]*(bdf0*r_t[3] + bdf1*r_t_n[3] + bdf2*r_t_nn[3]);
const double crRHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2] + r_N[3]*r_t_lin[3];
const double crRHS5 = 1.0/crRHS4;
const double crRHS6 = crRHS5*p_th;
const double crRHS7 = crRHS3*crRHS6;
const double crRHS8 = -crRHS7 + dp_th_dt;
const double crRHS9 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2] + r_DN(3,0)*r_t_lin[3];
const double crRHS10 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0)) + r_N[3]*(r_u(3,0) - r_u_mesh(3,0));
const double crRHS11 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2] + r_DN(3,1)*r_t_lin[3];
const double crRHS12 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1)) + r_N[3]*(r_u(3,1) - r_u_mesh(3,1));
const double crRHS13 = crRHS6*(crRHS10*crRHS9 + crRHS11*crRHS12);
const double crRHS14 = sigma*(r_N[0]*r_u(0,0) - r_N[0]*r_u_sol_frac(0,0) + r_N[1]*r_u(1,0) - r_N[1]*r_u_sol_frac(1,0) + r_N[2]*r_u(2,0) - r_N[2]*r_u_sol_frac(2,0) + r_N[3]*r_u(3,0) - r_N[3]*r_u_sol_frac(3,0));
const double crRHS15 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2] + lin_u_conv(3,0)*r_N[3];
const double crRHS16 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2] + lin_u_conv(3,1)*r_N[3];
const double crRHS17 = crRHS0*crRHS15 + crRHS16*(r_DN(0,1)*r_u(0,0) + r_DN(1,1)*r_u(1,0) + r_DN(2,1)*r_u(2,0) + r_DN(3,1)*r_u(3,0));
const double crRHS18 = r_N[0]*(bdf0*r_u(0,0) + bdf1*r_u_n(0,0) + bdf2*r_u_nn(0,0)) + r_N[1]*(bdf0*r_u(1,0) + bdf1*r_u_n(1,0) + bdf2*r_u_nn(1,0)) + r_N[2]*(bdf0*r_u(2,0) + bdf1*r_u_n(2,0) + bdf2*r_u_nn(2,0)) + r_N[3]*(bdf0*r_u(3,0) + bdf1*r_u_n(3,0) + bdf2*r_u_nn(3,0));
const double crRHS19 = 1.0/c_p;
const double crRHS20 = gamma/(gamma - 1.0);
const double crRHS21 = crRHS20*crRHS6;
const double crRHS22 = crRHS19*crRHS21;
const double crRHS23 = crRHS14 - crRHS22*(-crRHS17 - crRHS18 + r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0) + r_N[3]*r_g(3,0)) + r_DN(0,0)*r_p[0] + r_DN(1,0)*r_p[1] + r_DN(2,0)*r_p[2] + r_DN(3,0)*r_p[3];
const double crRHS24 = p_th*tau_u;
const double crRHS25 = crRHS23*crRHS24;
const double crRHS26 = sigma*(r_N[0]*r_u(0,1) - r_N[0]*r_u_sol_frac(0,1) + r_N[1]*r_u(1,1) - r_N[1]*r_u_sol_frac(1,1) + r_N[2]*r_u(2,1) - r_N[2]*r_u_sol_frac(2,1) + r_N[3]*r_u(3,1) - r_N[3]*r_u_sol_frac(3,1));
const double crRHS27 = crRHS1*crRHS16 + crRHS15*(r_DN(0,0)*r_u(0,1) + r_DN(1,0)*r_u(1,1) + r_DN(2,0)*r_u(2,1) + r_DN(3,0)*r_u(3,1));
const double crRHS28 = r_N[0]*(bdf0*r_u(0,1) + bdf1*r_u_n(0,1) + bdf2*r_u_nn(0,1)) + r_N[1]*(bdf0*r_u(1,1) + bdf1*r_u_n(1,1) + bdf2*r_u_nn(1,1)) + r_N[2]*(bdf0*r_u(2,1) + bdf1*r_u_n(2,1) + bdf2*r_u_nn(2,1)) + r_N[3]*(bdf0*r_u(3,1) + bdf1*r_u_n(3,1) + bdf2*r_u_nn(3,1));
const double crRHS29 = -crRHS22*(-crRHS27 - crRHS28 + r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1) + r_N[3]*r_g(3,1)) + crRHS26 + r_DN(0,1)*r_p[0] + r_DN(1,1)*r_p[1] + r_DN(2,1)*r_p[2] + r_DN(3,1)*r_p[3];
const double crRHS30 = crRHS24*crRHS29;
const double crRHS31 = crRHS19*crRHS20;
const double crRHS32 = crRHS31*crRHS5;
const double crRHS33 = crRHS32*gauss_weight;
const double crRHS34 = r_N[0]*r_p[0] + r_N[1]*r_p[1] + r_N[2]*r_p[2] + r_N[3]*r_p[3];
const double crRHS35 = r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0) + r_N[3]*r_g(3,0);
const double crRHS36 = crRHS22*r_N[0];
const double crRHS37 = sigma*tau_u;
const double crRHS38 = crRHS37*r_N[0];
const double crRHS39 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2] + r_DN(3,0)*r_t[3];
const double crRHS40 = crRHS10*crRHS39;
const double crRHS41 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2] + r_DN(3,1)*r_t[3];
const double crRHS42 = crRHS12*crRHS41;
const double crRHS43 = crRHS32*tau_c*(-crRHS2 + crRHS40*crRHS6 + crRHS42*crRHS6 + crRHS7 - dp_th_dt);
const double crRHS44 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1) + lin_u_conv(3,0)*r_DN(3,0) + lin_u_conv(3,1)*r_DN(3,1);
const double crRHS45 = crRHS44*tau_u;
const double crRHS46 = crRHS36*crRHS45;
const double crRHS47 = crRHS15*r_DN(0,0) + crRHS16*r_DN(0,1);
const double crRHS48 = crRHS22*tau_u;
const double crRHS49 = crRHS47*crRHS48;
const double crRHS50 = (crRHS11*crRHS16 + crRHS15*crRHS9)*1.0/(crRHS4*crRHS4);
const double crRHS51 = crRHS50*r_N[0];
const double crRHS52 = crRHS31*crRHS51;
const double crRHS53 = r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1) + r_N[3]*r_g(3,1);
const double crRHS54 = r_N[0]*r_heat_fl[0] + r_N[1]*r_heat_fl[1] + r_N[2]*r_heat_fl[2] + r_N[3]*r_heat_fl[3];
const double crRHS55 = crRHS39*kappa;
const double crRHS56 = crRHS41*kappa;
const double crRHS57 = crRHS5*dp_th_dt;
const double crRHS58 = crRHS57*(r_N[0]*r_t[0] + r_N[1]*r_t[1] + r_N[2]*r_t[2] + r_N[3]*r_t[3]);
const double crRHS59 = crRHS20*crRHS7;
const double crRHS60 = crRHS21*(crRHS40 + crRHS42);
const double crRHS61 = tau_t*(-crRHS21*(crRHS15*crRHS39 + crRHS16*crRHS41 + crRHS3) + crRHS54 + crRHS58);
const double crRHS62 = crRHS57*crRHS61;
const double crRHS63 = crRHS21*crRHS61;
const double crRHS64 = crRHS44*crRHS63;
const double crRHS65 = crRHS20*crRHS61*p_th;
const double crRHS66 = crRHS22*r_N[1];
const double crRHS67 = crRHS37*r_N[1];
const double crRHS68 = crRHS45*crRHS66;
const double crRHS69 = crRHS15*r_DN(1,0) + crRHS16*r_DN(1,1);
const double crRHS70 = crRHS48*crRHS69;
const double crRHS71 = crRHS31*crRHS50;
const double crRHS72 = crRHS71*r_N[1];
const double crRHS73 = crRHS50*crRHS65;
const double crRHS74 = crRHS22*r_N[2];
const double crRHS75 = crRHS37*r_N[2];
const double crRHS76 = crRHS45*crRHS74;
const double crRHS77 = crRHS15*r_DN(2,0) + crRHS16*r_DN(2,1);
const double crRHS78 = crRHS48*crRHS77;
const double crRHS79 = crRHS71*r_N[2];
const double crRHS80 = crRHS22*r_N[3];
const double crRHS81 = crRHS37*r_N[3];
const double crRHS82 = crRHS45*crRHS80;
const double crRHS83 = crRHS15*r_DN(3,0) + crRHS16*r_DN(3,1);
const double crRHS84 = crRHS48*crRHS83;
const double crRHS85 = crRHS71*r_N[3];
rRHS[0]+=-crRHS33*(-crRHS13*r_N[0] + crRHS2*r_N[0] + crRHS25*r_DN(0,0) + crRHS30*r_DN(0,1) + crRHS8*r_N[0]);
rRHS[1]+=-gauss_weight*(crRHS14*r_N[0] + crRHS17*crRHS36 + crRHS18*crRHS36 - crRHS23*crRHS38 + crRHS23*crRHS46 + crRHS23*crRHS49 - crRHS25*crRHS52 - crRHS34*r_DN(0,0) - crRHS35*crRHS36 - crRHS43*r_DN(0,0) + r_DN(0,0)*r_stress[0] + r_DN(0,1)*r_stress[2]);
rRHS[2]+=-gauss_weight*(crRHS26*r_N[0] + crRHS27*crRHS36 + crRHS28*crRHS36 - crRHS29*crRHS38 + crRHS29*crRHS46 + crRHS29*crRHS49 - crRHS30*crRHS52 - crRHS34*r_DN(0,1) - crRHS36*crRHS53 - crRHS43*r_DN(0,1) + r_DN(0,0)*r_stress[2] + r_DN(0,1)*r_stress[1]);
rRHS[3]+=gauss_weight*(crRHS47*crRHS63 - crRHS51*crRHS65 + crRHS54*r_N[0] - crRHS55*r_DN(0,0) - crRHS56*r_DN(0,1) + crRHS58*r_N[0] - crRHS59*r_N[0] - crRHS60*r_N[0] + crRHS62*r_N[0] + crRHS64*r_N[0]);
rRHS[4]+=-crRHS33*(-crRHS13*r_N[1] + crRHS2*r_N[1] + crRHS25*r_DN(1,0) + crRHS30*r_DN(1,1) + crRHS8*r_N[1]);
rRHS[5]+=-gauss_weight*(crRHS14*r_N[1] + crRHS17*crRHS66 + crRHS18*crRHS66 - crRHS23*crRHS67 + crRHS23*crRHS68 + crRHS23*crRHS70 - crRHS25*crRHS72 - crRHS34*r_DN(1,0) - crRHS35*crRHS66 - crRHS43*r_DN(1,0) + r_DN(1,0)*r_stress[0] + r_DN(1,1)*r_stress[2]);
rRHS[6]+=-gauss_weight*(crRHS26*r_N[1] + crRHS27*crRHS66 + crRHS28*crRHS66 - crRHS29*crRHS67 + crRHS29*crRHS68 + crRHS29*crRHS70 - crRHS30*crRHS72 - crRHS34*r_DN(1,1) - crRHS43*r_DN(1,1) - crRHS53*crRHS66 + r_DN(1,0)*r_stress[2] + r_DN(1,1)*r_stress[1]);
rRHS[7]+=gauss_weight*(crRHS54*r_N[1] - crRHS55*r_DN(1,0) - crRHS56*r_DN(1,1) + crRHS58*r_N[1] - crRHS59*r_N[1] - crRHS60*r_N[1] + crRHS62*r_N[1] + crRHS63*crRHS69 + crRHS64*r_N[1] - crRHS73*r_N[1]);
rRHS[8]+=-crRHS33*(-crRHS13*r_N[2] + crRHS2*r_N[2] + crRHS25*r_DN(2,0) + crRHS30*r_DN(2,1) + crRHS8*r_N[2]);
rRHS[9]+=-gauss_weight*(crRHS14*r_N[2] + crRHS17*crRHS74 + crRHS18*crRHS74 - crRHS23*crRHS75 + crRHS23*crRHS76 + crRHS23*crRHS78 - crRHS25*crRHS79 - crRHS34*r_DN(2,0) - crRHS35*crRHS74 - crRHS43*r_DN(2,0) + r_DN(2,0)*r_stress[0] + r_DN(2,1)*r_stress[2]);
rRHS[10]+=-gauss_weight*(crRHS26*r_N[2] + crRHS27*crRHS74 + crRHS28*crRHS74 - crRHS29*crRHS75 + crRHS29*crRHS76 + crRHS29*crRHS78 - crRHS30*crRHS79 - crRHS34*r_DN(2,1) - crRHS43*r_DN(2,1) - crRHS53*crRHS74 + r_DN(2,0)*r_stress[2] + r_DN(2,1)*r_stress[1]);
rRHS[11]+=gauss_weight*(crRHS54*r_N[2] - crRHS55*r_DN(2,0) - crRHS56*r_DN(2,1) + crRHS58*r_N[2] - crRHS59*r_N[2] - crRHS60*r_N[2] + crRHS62*r_N[2] + crRHS63*crRHS77 + crRHS64*r_N[2] - crRHS73*r_N[2]);
rRHS[12]+=-crRHS33*(-crRHS13*r_N[3] + crRHS2*r_N[3] + crRHS25*r_DN(3,0) + crRHS30*r_DN(3,1) + crRHS8*r_N[3]);
rRHS[13]+=-gauss_weight*(crRHS14*r_N[3] + crRHS17*crRHS80 + crRHS18*crRHS80 - crRHS23*crRHS81 + crRHS23*crRHS82 + crRHS23*crRHS84 - crRHS25*crRHS85 - crRHS34*r_DN(3,0) - crRHS35*crRHS80 - crRHS43*r_DN(3,0) + r_DN(3,0)*r_stress[0] + r_DN(3,1)*r_stress[2]);
rRHS[14]+=-gauss_weight*(crRHS26*r_N[3] + crRHS27*crRHS80 + crRHS28*crRHS80 - crRHS29*crRHS81 + crRHS29*crRHS82 + crRHS29*crRHS84 - crRHS30*crRHS85 - crRHS34*r_DN(3,1) - crRHS43*r_DN(3,1) - crRHS53*crRHS80 + r_DN(3,0)*r_stress[2] + r_DN(3,1)*r_stress[1]);
rRHS[15]+=gauss_weight*(crRHS54*r_N[3] - crRHS55*r_DN(3,0) - crRHS56*r_DN(3,1) + crRHS58*r_N[3] - crRHS59*r_N[3] - crRHS60*r_N[3] + crRHS62*r_N[3] + crRHS63*crRHS83 + crRHS64*r_N[3] - crRHS73*r_N[3]);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<3,4>>::ComputeGaussPointRHSContribution(
    LowMachNavierStokesData<3,4>& rData,
    VectorType& rRHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_stress = rData.ShearStress;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;
    const double bdf1 = rData.bdf1;
    const double bdf2 = rData.bdf2;

    // Nodal data
    const auto& r_p = rData.Pressure;
    const auto& r_u = rData.Velocity;
    const auto& r_u_n = rData.VelocityOldStep1;
    const auto& r_u_nn = rData.VelocityOldStep2;
    const auto& r_t = rData.Temperature;
    const auto& r_t_n = rData.TemperatureOldStep1;
    const auto& r_t_nn = rData.TemperatureOldStep2;
    const auto& r_g = rData.BodyForce;
    const auto& r_heat_fl = rData.HeatFlux;
    const auto& r_u_sol_frac = rData.SolidFractionVelocity;

    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double, 2, 3> lin_u_conv = r_u - r_u_mesh;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add RHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crRHS0 = r_DN(0,0)*r_u(0,0) + r_DN(1,0)*r_u(1,0) + r_DN(2,0)*r_u(2,0);
const double crRHS1 = r_DN(0,1)*r_u(0,1) + r_DN(1,1)*r_u(1,1) + r_DN(2,1)*r_u(2,1);
const double crRHS2 = p_th*(crRHS0 + crRHS1);
const double crRHS3 = r_N[0]*(bdf0*r_t[0] + bdf1*r_t_n[0] + bdf2*r_t_nn[0]) + r_N[1]*(bdf0*r_t[1] + bdf1*r_t_n[1] + bdf2*r_t_nn[1]) + r_N[2]*(bdf0*r_t[2] + bdf1*r_t_n[2] + bdf2*r_t_nn[2]);
const double crRHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2];
const double crRHS5 = 1.0/crRHS4;
const double crRHS6 = crRHS5*p_th;
const double crRHS7 = crRHS3*crRHS6;
const double crRHS8 = -crRHS7 + dp_th_dt;
const double crRHS9 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2];
const double crRHS10 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0));
const double crRHS11 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2];
const double crRHS12 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1));
const double crRHS13 = crRHS6*(crRHS10*crRHS9 + crRHS11*crRHS12);
const double crRHS14 = sigma*(r_N[0]*r_u(0,0) - r_N[0]*r_u_sol_frac(0,0) + r_N[1]*r_u(1,0) - r_N[1]*r_u_sol_frac(1,0) + r_N[2]*r_u(2,0) - r_N[2]*r_u_sol_frac(2,0));
const double crRHS15 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2];
const double crRHS16 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2];
const double crRHS17 = crRHS0*crRHS15 + crRHS16*(r_DN(0,1)*r_u(0,0) + r_DN(1,1)*r_u(1,0) + r_DN(2,1)*r_u(2,0));
const double crRHS18 = r_N[0]*(bdf0*r_u(0,0) + bdf1*r_u_n(0,0) + bdf2*r_u_nn(0,0)) + r_N[1]*(bdf0*r_u(1,0) + bdf1*r_u_n(1,0) + bdf2*r_u_nn(1,0)) + r_N[2]*(bdf0*r_u(2,0) + bdf1*r_u_n(2,0) + bdf2*r_u_nn(2,0));
const double crRHS19 = 1.0/c_p;
const double crRHS20 = gamma/(gamma - 1.0);
const double crRHS21 = crRHS20*crRHS6;
const double crRHS22 = crRHS19*crRHS21;
const double crRHS23 = crRHS14 - crRHS22*(-crRHS17 - crRHS18 + r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0)) + r_DN(0,0)*r_p[0] + r_DN(1,0)*r_p[1] + r_DN(2,0)*r_p[2];
const double crRHS24 = p_th*tau_u;
const double crRHS25 = crRHS23*crRHS24;
const double crRHS26 = sigma*(r_N[0]*r_u(0,1) - r_N[0]*r_u_sol_frac(0,1) + r_N[1]*r_u(1,1) - r_N[1]*r_u_sol_frac(1,1) + r_N[2]*r_u(2,1) - r_N[2]*r_u_sol_frac(2,1));
const double crRHS27 = crRHS1*crRHS16 + crRHS15*(r_DN(0,0)*r_u(0,1) + r_DN(1,0)*r_u(1,1) + r_DN(2,0)*r_u(2,1));
const double crRHS28 = r_N[0]*(bdf0*r_u(0,1) + bdf1*r_u_n(0,1) + bdf2*r_u_nn(0,1)) + r_N[1]*(bdf0*r_u(1,1) + bdf1*r_u_n(1,1) + bdf2*r_u_nn(1,1)) + r_N[2]*(bdf0*r_u(2,1) + bdf1*r_u_n(2,1) + bdf2*r_u_nn(2,1));
const double crRHS29 = -crRHS22*(-crRHS27 - crRHS28 + r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1)) + crRHS26 + r_DN(0,1)*r_p[0] + r_DN(1,1)*r_p[1] + r_DN(2,1)*r_p[2];
const double crRHS30 = crRHS24*crRHS29;
const double crRHS31 = crRHS19*crRHS20;
const double crRHS32 = crRHS31*crRHS5;
const double crRHS33 = crRHS32*gauss_weight;
const double crRHS34 = r_N[0]*r_p[0] + r_N[1]*r_p[1] + r_N[2]*r_p[2];
const double crRHS35 = r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0);
const double crRHS36 = crRHS22*r_N[0];
const double crRHS37 = sigma*tau_u;
const double crRHS38 = crRHS37*r_N[0];
const double crRHS39 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2];
const double crRHS40 = crRHS10*crRHS39;
const double crRHS41 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2];
const double crRHS42 = crRHS12*crRHS41;
const double crRHS43 = crRHS32*tau_c*(-crRHS2 + crRHS40*crRHS6 + crRHS42*crRHS6 + crRHS7 - dp_th_dt);
const double crRHS44 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1);
const double crRHS45 = crRHS44*tau_u;
const double crRHS46 = crRHS36*crRHS45;
const double crRHS47 = crRHS15*r_DN(0,0) + crRHS16*r_DN(0,1);
const double crRHS48 = crRHS22*tau_u;
const double crRHS49 = crRHS47*crRHS48;
const double crRHS50 = (crRHS11*crRHS16 + crRHS15*crRHS9)*1.0/(crRHS4*crRHS4);
const double crRHS51 = crRHS50*r_N[0];
const double crRHS52 = crRHS31*crRHS51;
const double crRHS53 = r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1);
const double crRHS54 = r_N[0]*r_heat_fl[0] + r_N[1]*r_heat_fl[1] + r_N[2]*r_heat_fl[2];
const double crRHS55 = crRHS39*kappa;
const double crRHS56 = crRHS41*kappa;
const double crRHS57 = crRHS5*dp_th_dt;
const double crRHS58 = crRHS57*(r_N[0]*r_t[0] + r_N[1]*r_t[1] + r_N[2]*r_t[2]);
const double crRHS59 = crRHS20*crRHS7;
const double crRHS60 = crRHS21*(crRHS40 + crRHS42);
const double crRHS61 = tau_t*(-crRHS21*(crRHS15*crRHS39 + crRHS16*crRHS41 + crRHS3) + crRHS54 + crRHS58);
const double crRHS62 = crRHS57*crRHS61;
const double crRHS63 = crRHS21*crRHS61;
const double crRHS64 = crRHS44*crRHS63;
const double crRHS65 = crRHS20*crRHS61*p_th;
const double crRHS66 = crRHS22*r_N[1];
const double crRHS67 = crRHS37*r_N[1];
const double crRHS68 = crRHS45*crRHS66;
const double crRHS69 = crRHS15*r_DN(1,0) + crRHS16*r_DN(1,1);
const double crRHS70 = crRHS48*crRHS69;
const double crRHS71 = crRHS31*crRHS50;
const double crRHS72 = crRHS71*r_N[1];
const double crRHS73 = crRHS50*crRHS65;
const double crRHS74 = crRHS22*r_N[2];
const double crRHS75 = crRHS37*r_N[2];
const double crRHS76 = crRHS45*crRHS74;
const double crRHS77 = crRHS15*r_DN(2,0) + crRHS16*r_DN(2,1);
const double crRHS78 = crRHS48*crRHS77;
const double crRHS79 = crRHS71*r_N[2];
rRHS[0]+=-crRHS33*(-crRHS13*r_N[0] + crRHS2*r_N[0] + crRHS25*r_DN(0,0) + crRHS30*r_DN(0,1) + crRHS8*r_N[0]);
rRHS[1]+=-gauss_weight*(crRHS14*r_N[0] + crRHS17*crRHS36 + crRHS18*crRHS36 - crRHS23*crRHS38 + crRHS23*crRHS46 + crRHS23*crRHS49 - crRHS25*crRHS52 - crRHS34*r_DN(0,0) - crRHS35*crRHS36 - crRHS43*r_DN(0,0) + r_DN(0,0)*r_stress[0] + r_DN(0,1)*r_stress[2]);
rRHS[2]+=-gauss_weight*(crRHS26*r_N[0] + crRHS27*crRHS36 + crRHS28*crRHS36 - crRHS29*crRHS38 + crRHS29*crRHS46 + crRHS29*crRHS49 - crRHS30*crRHS52 - crRHS34*r_DN(0,1) - crRHS36*crRHS53 - crRHS43*r_DN(0,1) + r_DN(0,0)*r_stress[2] + r_DN(0,1)*r_stress[1]);
rRHS[3]+=gauss_weight*(crRHS47*crRHS63 - crRHS51*crRHS65 + crRHS54*r_N[0] - crRHS55*r_DN(0,0) - crRHS56*r_DN(0,1) + crRHS58*r_N[0] - crRHS59*r_N[0] - crRHS60*r_N[0] + crRHS62*r_N[0] + crRHS64*r_N[0]);
rRHS[4]+=-crRHS33*(-crRHS13*r_N[1] + crRHS2*r_N[1] + crRHS25*r_DN(1,0) + crRHS30*r_DN(1,1) + crRHS8*r_N[1]);
rRHS[5]+=-gauss_weight*(crRHS14*r_N[1] + crRHS17*crRHS66 + crRHS18*crRHS66 - crRHS23*crRHS67 + crRHS23*crRHS68 + crRHS23*crRHS70 - crRHS25*crRHS72 - crRHS34*r_DN(1,0) - crRHS35*crRHS66 - crRHS43*r_DN(1,0) + r_DN(1,0)*r_stress[0] + r_DN(1,1)*r_stress[2]);
rRHS[6]+=-gauss_weight*(crRHS26*r_N[1] + crRHS27*crRHS66 + crRHS28*crRHS66 - crRHS29*crRHS67 + crRHS29*crRHS68 + crRHS29*crRHS70 - crRHS30*crRHS72 - crRHS34*r_DN(1,1) - crRHS43*r_DN(1,1) - crRHS53*crRHS66 + r_DN(1,0)*r_stress[2] + r_DN(1,1)*r_stress[1]);
rRHS[7]+=gauss_weight*(crRHS54*r_N[1] - crRHS55*r_DN(1,0) - crRHS56*r_DN(1,1) + crRHS58*r_N[1] - crRHS59*r_N[1] - crRHS60*r_N[1] + crRHS62*r_N[1] + crRHS63*crRHS69 + crRHS64*r_N[1] - crRHS73*r_N[1]);
rRHS[8]+=-crRHS33*(-crRHS13*r_N[2] + crRHS2*r_N[2] + crRHS25*r_DN(2,0) + crRHS30*r_DN(2,1) + crRHS8*r_N[2]);
rRHS[9]+=-gauss_weight*(crRHS14*r_N[2] + crRHS17*crRHS74 + crRHS18*crRHS74 - crRHS23*crRHS75 + crRHS23*crRHS76 + crRHS23*crRHS78 - crRHS25*crRHS79 - crRHS34*r_DN(2,0) - crRHS35*crRHS74 - crRHS43*r_DN(2,0) + r_DN(2,0)*r_stress[0] + r_DN(2,1)*r_stress[2]);
rRHS[10]+=-gauss_weight*(crRHS26*r_N[2] + crRHS27*crRHS74 + crRHS28*crRHS74 - crRHS29*crRHS75 + crRHS29*crRHS76 + crRHS29*crRHS78 - crRHS30*crRHS79 - crRHS34*r_DN(2,1) - crRHS43*r_DN(2,1) - crRHS53*crRHS74 + r_DN(2,0)*r_stress[2] + r_DN(2,1)*r_stress[1]);
rRHS[11]+=gauss_weight*(crRHS54*r_N[2] - crRHS55*r_DN(2,0) - crRHS56*r_DN(2,1) + crRHS58*r_N[2] - crRHS59*r_N[2] - crRHS60*r_N[2] + crRHS62*r_N[2] + crRHS63*crRHS77 + crRHS64*r_N[2] - crRHS73*r_N[2]);

}

template <>
void LowMachNavierStokes<LowMachNavierStokesData<3,8>>::ComputeGaussPointRHSContribution(
    LowMachNavierStokesData<3,8>& rData,
    VectorType& rRHS)
{
    // Material parameters
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    const double gamma = rData.HeatCapacityRatio;

    // Thermodynamic pressure
    const double p_th = rData.ThermodynamicPressure;
    const double dp_th_dt = rData.ThermodynamicPressureDerivative;

    // Material response parameters
    const auto& r_stress = rData.ShearStress;

    // Dynamic parameters
    const double bdf0 = rData.bdf0;
    const double bdf1 = rData.bdf1;
    const double bdf2 = rData.bdf2;

    // Nodal data
    const auto& r_p = rData.Pressure;
    const auto& r_u = rData.Velocity;
    const auto& r_u_n = rData.VelocityOldStep1;
    const auto& r_u_nn = rData.VelocityOldStep2;
    const auto& r_t = rData.Temperature;
    const auto& r_t_n = rData.TemperatureOldStep1;
    const auto& r_t_nn = rData.TemperatureOldStep2;
    const auto& r_g = rData.BodyForce;
    const auto& r_heat_fl = rData.HeatFlux;
    const auto& r_u_sol_frac = rData.SolidFractionVelocity;

    const auto& r_t_lin = rData.Temperature;
    const auto& r_u_mesh = rData.MeshVelocity;
    const BoundedMatrix<double, 2, 4> lin_u_conv = r_u - r_u_mesh;

    // Get shape function values
    const auto& r_N = rData.N;
    const auto& r_DN = rData.DN_DX;

    // Stabilization parameters
    double tau_c;
    double tau_u;
    double tau_t;
    CalculateStabilizationConstants(rData, tau_c, tau_u, tau_t);

    // Add RHS Gauss point contribution
    const double gauss_weight = rData.Weight;

    const double crRHS0 = r_DN(0,0)*r_u(0,0) + r_DN(1,0)*r_u(1,0) + r_DN(2,0)*r_u(2,0) + r_DN(3,0)*r_u(3,0);
const double crRHS1 = r_DN(0,1)*r_u(0,1) + r_DN(1,1)*r_u(1,1) + r_DN(2,1)*r_u(2,1) + r_DN(3,1)*r_u(3,1);
const double crRHS2 = p_th*(crRHS0 + crRHS1);
const double crRHS3 = r_N[0]*(bdf0*r_t[0] + bdf1*r_t_n[0] + bdf2*r_t_nn[0]) + r_N[1]*(bdf0*r_t[1] + bdf1*r_t_n[1] + bdf2*r_t_nn[1]) + r_N[2]*(bdf0*r_t[2] + bdf1*r_t_n[2] + bdf2*r_t_nn[2]) + r_N[3]*(bdf0*r_t[3] + bdf1*r_t_n[3] + bdf2*r_t_nn[3]);
const double crRHS4 = r_N[0]*r_t_lin[0] + r_N[1]*r_t_lin[1] + r_N[2]*r_t_lin[2] + r_N[3]*r_t_lin[3];
const double crRHS5 = 1.0/crRHS4;
const double crRHS6 = crRHS5*p_th;
const double crRHS7 = crRHS3*crRHS6;
const double crRHS8 = -crRHS7 + dp_th_dt;
const double crRHS9 = r_DN(0,0)*r_t_lin[0] + r_DN(1,0)*r_t_lin[1] + r_DN(2,0)*r_t_lin[2] + r_DN(3,0)*r_t_lin[3];
const double crRHS10 = r_N[0]*(r_u(0,0) - r_u_mesh(0,0)) + r_N[1]*(r_u(1,0) - r_u_mesh(1,0)) + r_N[2]*(r_u(2,0) - r_u_mesh(2,0)) + r_N[3]*(r_u(3,0) - r_u_mesh(3,0));
const double crRHS11 = r_DN(0,1)*r_t_lin[0] + r_DN(1,1)*r_t_lin[1] + r_DN(2,1)*r_t_lin[2] + r_DN(3,1)*r_t_lin[3];
const double crRHS12 = r_N[0]*(r_u(0,1) - r_u_mesh(0,1)) + r_N[1]*(r_u(1,1) - r_u_mesh(1,1)) + r_N[2]*(r_u(2,1) - r_u_mesh(2,1)) + r_N[3]*(r_u(3,1) - r_u_mesh(3,1));
const double crRHS13 = crRHS6*(crRHS10*crRHS9 + crRHS11*crRHS12);
const double crRHS14 = sigma*(r_N[0]*r_u(0,0) - r_N[0]*r_u_sol_frac(0,0) + r_N[1]*r_u(1,0) - r_N[1]*r_u_sol_frac(1,0) + r_N[2]*r_u(2,0) - r_N[2]*r_u_sol_frac(2,0) + r_N[3]*r_u(3,0) - r_N[3]*r_u_sol_frac(3,0));
const double crRHS15 = lin_u_conv(0,0)*r_N[0] + lin_u_conv(1,0)*r_N[1] + lin_u_conv(2,0)*r_N[2] + lin_u_conv(3,0)*r_N[3];
const double crRHS16 = lin_u_conv(0,1)*r_N[0] + lin_u_conv(1,1)*r_N[1] + lin_u_conv(2,1)*r_N[2] + lin_u_conv(3,1)*r_N[3];
const double crRHS17 = crRHS0*crRHS15 + crRHS16*(r_DN(0,1)*r_u(0,0) + r_DN(1,1)*r_u(1,0) + r_DN(2,1)*r_u(2,0) + r_DN(3,1)*r_u(3,0));
const double crRHS18 = r_N[0]*(bdf0*r_u(0,0) + bdf1*r_u_n(0,0) + bdf2*r_u_nn(0,0)) + r_N[1]*(bdf0*r_u(1,0) + bdf1*r_u_n(1,0) + bdf2*r_u_nn(1,0)) + r_N[2]*(bdf0*r_u(2,0) + bdf1*r_u_n(2,0) + bdf2*r_u_nn(2,0)) + r_N[3]*(bdf0*r_u(3,0) + bdf1*r_u_n(3,0) + bdf2*r_u_nn(3,0));
const double crRHS19 = 1.0/c_p;
const double crRHS20 = gamma/(gamma - 1.0);
const double crRHS21 = crRHS20*crRHS6;
const double crRHS22 = crRHS19*crRHS21;
const double crRHS23 = crRHS14 - crRHS22*(-crRHS17 - crRHS18 + r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0) + r_N[3]*r_g(3,0)) + r_DN(0,0)*r_p[0] + r_DN(1,0)*r_p[1] + r_DN(2,0)*r_p[2] + r_DN(3,0)*r_p[3];
const double crRHS24 = p_th*tau_u;
const double crRHS25 = crRHS23*crRHS24;
const double crRHS26 = sigma*(r_N[0]*r_u(0,1) - r_N[0]*r_u_sol_frac(0,1) + r_N[1]*r_u(1,1) - r_N[1]*r_u_sol_frac(1,1) + r_N[2]*r_u(2,1) - r_N[2]*r_u_sol_frac(2,1) + r_N[3]*r_u(3,1) - r_N[3]*r_u_sol_frac(3,1));
const double crRHS27 = crRHS1*crRHS16 + crRHS15*(r_DN(0,0)*r_u(0,1) + r_DN(1,0)*r_u(1,1) + r_DN(2,0)*r_u(2,1) + r_DN(3,0)*r_u(3,1));
const double crRHS28 = r_N[0]*(bdf0*r_u(0,1) + bdf1*r_u_n(0,1) + bdf2*r_u_nn(0,1)) + r_N[1]*(bdf0*r_u(1,1) + bdf1*r_u_n(1,1) + bdf2*r_u_nn(1,1)) + r_N[2]*(bdf0*r_u(2,1) + bdf1*r_u_n(2,1) + bdf2*r_u_nn(2,1)) + r_N[3]*(bdf0*r_u(3,1) + bdf1*r_u_n(3,1) + bdf2*r_u_nn(3,1));
const double crRHS29 = -crRHS22*(-crRHS27 - crRHS28 + r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1) + r_N[3]*r_g(3,1)) + crRHS26 + r_DN(0,1)*r_p[0] + r_DN(1,1)*r_p[1] + r_DN(2,1)*r_p[2] + r_DN(3,1)*r_p[3];
const double crRHS30 = crRHS24*crRHS29;
const double crRHS31 = crRHS19*crRHS20;
const double crRHS32 = crRHS31*crRHS5;
const double crRHS33 = crRHS32*gauss_weight;
const double crRHS34 = r_N[0]*r_p[0] + r_N[1]*r_p[1] + r_N[2]*r_p[2] + r_N[3]*r_p[3];
const double crRHS35 = r_N[0]*r_g(0,0) + r_N[1]*r_g(1,0) + r_N[2]*r_g(2,0) + r_N[3]*r_g(3,0);
const double crRHS36 = crRHS22*r_N[0];
const double crRHS37 = sigma*tau_u;
const double crRHS38 = crRHS37*r_N[0];
const double crRHS39 = r_DN(0,0)*r_t[0] + r_DN(1,0)*r_t[1] + r_DN(2,0)*r_t[2] + r_DN(3,0)*r_t[3];
const double crRHS40 = crRHS10*crRHS39;
const double crRHS41 = r_DN(0,1)*r_t[0] + r_DN(1,1)*r_t[1] + r_DN(2,1)*r_t[2] + r_DN(3,1)*r_t[3];
const double crRHS42 = crRHS12*crRHS41;
const double crRHS43 = crRHS32*tau_c*(-crRHS2 + crRHS40*crRHS6 + crRHS42*crRHS6 + crRHS7 - dp_th_dt);
const double crRHS44 = lin_u_conv(0,0)*r_DN(0,0) + lin_u_conv(0,1)*r_DN(0,1) + lin_u_conv(1,0)*r_DN(1,0) + lin_u_conv(1,1)*r_DN(1,1) + lin_u_conv(2,0)*r_DN(2,0) + lin_u_conv(2,1)*r_DN(2,1) + lin_u_conv(3,0)*r_DN(3,0) + lin_u_conv(3,1)*r_DN(3,1);
const double crRHS45 = crRHS44*tau_u;
const double crRHS46 = crRHS36*crRHS45;
const double crRHS47 = crRHS15*r_DN(0,0) + crRHS16*r_DN(0,1);
const double crRHS48 = crRHS22*tau_u;
const double crRHS49 = crRHS47*crRHS48;
const double crRHS50 = (crRHS11*crRHS16 + crRHS15*crRHS9)*1.0/(crRHS4*crRHS4);
const double crRHS51 = crRHS50*r_N[0];
const double crRHS52 = crRHS31*crRHS51;
const double crRHS53 = r_N[0]*r_g(0,1) + r_N[1]*r_g(1,1) + r_N[2]*r_g(2,1) + r_N[3]*r_g(3,1);
const double crRHS54 = r_N[0]*r_heat_fl[0] + r_N[1]*r_heat_fl[1] + r_N[2]*r_heat_fl[2] + r_N[3]*r_heat_fl[3];
const double crRHS55 = crRHS39*kappa;
const double crRHS56 = crRHS41*kappa;
const double crRHS57 = crRHS5*dp_th_dt;
const double crRHS58 = crRHS57*(r_N[0]*r_t[0] + r_N[1]*r_t[1] + r_N[2]*r_t[2] + r_N[3]*r_t[3]);
const double crRHS59 = crRHS20*crRHS7;
const double crRHS60 = crRHS21*(crRHS40 + crRHS42);
const double crRHS61 = tau_t*(-crRHS21*(crRHS15*crRHS39 + crRHS16*crRHS41 + crRHS3) + crRHS54 + crRHS58);
const double crRHS62 = crRHS57*crRHS61;
const double crRHS63 = crRHS21*crRHS61;
const double crRHS64 = crRHS44*crRHS63;
const double crRHS65 = crRHS20*crRHS61*p_th;
const double crRHS66 = crRHS22*r_N[1];
const double crRHS67 = crRHS37*r_N[1];
const double crRHS68 = crRHS45*crRHS66;
const double crRHS69 = crRHS15*r_DN(1,0) + crRHS16*r_DN(1,1);
const double crRHS70 = crRHS48*crRHS69;
const double crRHS71 = crRHS31*crRHS50;
const double crRHS72 = crRHS71*r_N[1];
const double crRHS73 = crRHS50*crRHS65;
const double crRHS74 = crRHS22*r_N[2];
const double crRHS75 = crRHS37*r_N[2];
const double crRHS76 = crRHS45*crRHS74;
const double crRHS77 = crRHS15*r_DN(2,0) + crRHS16*r_DN(2,1);
const double crRHS78 = crRHS48*crRHS77;
const double crRHS79 = crRHS71*r_N[2];
const double crRHS80 = crRHS22*r_N[3];
const double crRHS81 = crRHS37*r_N[3];
const double crRHS82 = crRHS45*crRHS80;
const double crRHS83 = crRHS15*r_DN(3,0) + crRHS16*r_DN(3,1);
const double crRHS84 = crRHS48*crRHS83;
const double crRHS85 = crRHS71*r_N[3];
rRHS[0]+=-crRHS33*(-crRHS13*r_N[0] + crRHS2*r_N[0] + crRHS25*r_DN(0,0) + crRHS30*r_DN(0,1) + crRHS8*r_N[0]);
rRHS[1]+=-gauss_weight*(crRHS14*r_N[0] + crRHS17*crRHS36 + crRHS18*crRHS36 - crRHS23*crRHS38 + crRHS23*crRHS46 + crRHS23*crRHS49 - crRHS25*crRHS52 - crRHS34*r_DN(0,0) - crRHS35*crRHS36 - crRHS43*r_DN(0,0) + r_DN(0,0)*r_stress[0] + r_DN(0,1)*r_stress[2]);
rRHS[2]+=-gauss_weight*(crRHS26*r_N[0] + crRHS27*crRHS36 + crRHS28*crRHS36 - crRHS29*crRHS38 + crRHS29*crRHS46 + crRHS29*crRHS49 - crRHS30*crRHS52 - crRHS34*r_DN(0,1) - crRHS36*crRHS53 - crRHS43*r_DN(0,1) + r_DN(0,0)*r_stress[2] + r_DN(0,1)*r_stress[1]);
rRHS[3]+=gauss_weight*(crRHS47*crRHS63 - crRHS51*crRHS65 + crRHS54*r_N[0] - crRHS55*r_DN(0,0) - crRHS56*r_DN(0,1) + crRHS58*r_N[0] - crRHS59*r_N[0] - crRHS60*r_N[0] + crRHS62*r_N[0] + crRHS64*r_N[0]);
rRHS[4]+=-crRHS33*(-crRHS13*r_N[1] + crRHS2*r_N[1] + crRHS25*r_DN(1,0) + crRHS30*r_DN(1,1) + crRHS8*r_N[1]);
rRHS[5]+=-gauss_weight*(crRHS14*r_N[1] + crRHS17*crRHS66 + crRHS18*crRHS66 - crRHS23*crRHS67 + crRHS23*crRHS68 + crRHS23*crRHS70 - crRHS25*crRHS72 - crRHS34*r_DN(1,0) - crRHS35*crRHS66 - crRHS43*r_DN(1,0) + r_DN(1,0)*r_stress[0] + r_DN(1,1)*r_stress[2]);
rRHS[6]+=-gauss_weight*(crRHS26*r_N[1] + crRHS27*crRHS66 + crRHS28*crRHS66 - crRHS29*crRHS67 + crRHS29*crRHS68 + crRHS29*crRHS70 - crRHS30*crRHS72 - crRHS34*r_DN(1,1) - crRHS43*r_DN(1,1) - crRHS53*crRHS66 + r_DN(1,0)*r_stress[2] + r_DN(1,1)*r_stress[1]);
rRHS[7]+=gauss_weight*(crRHS54*r_N[1] - crRHS55*r_DN(1,0) - crRHS56*r_DN(1,1) + crRHS58*r_N[1] - crRHS59*r_N[1] - crRHS60*r_N[1] + crRHS62*r_N[1] + crRHS63*crRHS69 + crRHS64*r_N[1] - crRHS73*r_N[1]);
rRHS[8]+=-crRHS33*(-crRHS13*r_N[2] + crRHS2*r_N[2] + crRHS25*r_DN(2,0) + crRHS30*r_DN(2,1) + crRHS8*r_N[2]);
rRHS[9]+=-gauss_weight*(crRHS14*r_N[2] + crRHS17*crRHS74 + crRHS18*crRHS74 - crRHS23*crRHS75 + crRHS23*crRHS76 + crRHS23*crRHS78 - crRHS25*crRHS79 - crRHS34*r_DN(2,0) - crRHS35*crRHS74 - crRHS43*r_DN(2,0) + r_DN(2,0)*r_stress[0] + r_DN(2,1)*r_stress[2]);
rRHS[10]+=-gauss_weight*(crRHS26*r_N[2] + crRHS27*crRHS74 + crRHS28*crRHS74 - crRHS29*crRHS75 + crRHS29*crRHS76 + crRHS29*crRHS78 - crRHS30*crRHS79 - crRHS34*r_DN(2,1) - crRHS43*r_DN(2,1) - crRHS53*crRHS74 + r_DN(2,0)*r_stress[2] + r_DN(2,1)*r_stress[1]);
rRHS[11]+=gauss_weight*(crRHS54*r_N[2] - crRHS55*r_DN(2,0) - crRHS56*r_DN(2,1) + crRHS58*r_N[2] - crRHS59*r_N[2] - crRHS60*r_N[2] + crRHS62*r_N[2] + crRHS63*crRHS77 + crRHS64*r_N[2] - crRHS73*r_N[2]);
rRHS[12]+=-crRHS33*(-crRHS13*r_N[3] + crRHS2*r_N[3] + crRHS25*r_DN(3,0) + crRHS30*r_DN(3,1) + crRHS8*r_N[3]);
rRHS[13]+=-gauss_weight*(crRHS14*r_N[3] + crRHS17*crRHS80 + crRHS18*crRHS80 - crRHS23*crRHS81 + crRHS23*crRHS82 + crRHS23*crRHS84 - crRHS25*crRHS85 - crRHS34*r_DN(3,0) - crRHS35*crRHS80 - crRHS43*r_DN(3,0) + r_DN(3,0)*r_stress[0] + r_DN(3,1)*r_stress[2]);
rRHS[14]+=-gauss_weight*(crRHS26*r_N[3] + crRHS27*crRHS80 + crRHS28*crRHS80 - crRHS29*crRHS81 + crRHS29*crRHS82 + crRHS29*crRHS84 - crRHS30*crRHS85 - crRHS34*r_DN(3,1) - crRHS43*r_DN(3,1) - crRHS53*crRHS80 + r_DN(3,0)*r_stress[2] + r_DN(3,1)*r_stress[1]);
rRHS[15]+=gauss_weight*(crRHS54*r_N[3] - crRHS55*r_DN(3,0) - crRHS56*r_DN(3,1) + crRHS58*r_N[3] - crRHS59*r_N[3] - crRHS60*r_N[3] + crRHS62*r_N[3] + crRHS63*crRHS83 + crRHS64*r_N[3] - crRHS73*r_N[3]);

}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Private operations

template< class TElementData >
void LowMachNavierStokes<TElementData>::CalculateStabilizationConstants(
    const TElementData& rData,
    double& rTauPressure,
    double& rTauVelocity,
    double& rTauTemperature)
{
    // Get values from data container
    const double h = rData.ElementSize;
    const double c_p = rData.SpecificHeat;
    const double sigma = rData.Resistance;
    const double kappa = rData.Conductivity;
    // const double dt = rData.DeltaTime;
    // const double dyn_tau = rData.DynamicTau;
    const double mu = rData.EffectiveViscosity;
    const double gamma = rData.HeatCapacityRatio;
    const double p_th = rData.ThermodynamicPressure;

    // Data (temperature and convective velocity) interpolation to Gauss points
    double t_gauss = 0.0;
    array_1d<double,3> u_conv_gauss = ZeroVector(3);
    for (IndexType i_node = 0; i_node < TElementData::NumNodes; ++i_node) {
        t_gauss += rData.N[i_node] * rData.Temperature[i_node];
        const auto& r_u_i = row(rData.Velocity, i_node);
        const auto& r_u_m_i = row(rData.MeshVelocity, i_node);
        for (IndexType d = 0; d < TElementData::Dim; ++d) {
            u_conv_gauss[d] += rData.N[i_node] * (r_u_i[d] - r_u_m_i[d]);
        }
    }

    // Calculate stabilization constants at Gauss points
    const double norm_u_conv = norm_2(u_conv_gauss); // Convective velocity norm
    const double rho_gauss = (gamma / c_p / (gamma - 1.0)) * p_th / t_gauss; // Density (from equation of state)

    rTauPressure = mu / rho_gauss + stab_c2 * norm_u_conv * h / stab_c1; // Pressure subscale stabilization operator
    rTauVelocity = 1.0 / (stab_c1 * mu / std::pow(h, 2) + stab_c2 * h * norm_u_conv / h + stab_c3 * sigma / h); // Velocity subscale stabilization operator
    rTauTemperature = 1.0 / (stab_c1 * kappa / std::pow(h, 2) + stab_c2 * rho_gauss * c_p * norm_u_conv / h); // Temperature subscale stabilization operator
}


///////////////////////////////////////////////////////////////////////////////////////////////////
// Private serialization

template< class TElementData >
void LowMachNavierStokes<TElementData>::save(Serializer& rSerializer) const
{
    KRATOS_SERIALIZE_SAVE_BASE_CLASS(rSerializer, BaseType);
}


template< class TElementData >
void LowMachNavierStokes<TElementData>::load(Serializer& rSerializer)
{
    KRATOS_SERIALIZE_LOAD_BASE_CLASS(rSerializer, BaseType);
}

///////////////////////////////////////////////////////////////////////////////////////////////////
// Class template instantiation

template class LowMachNavierStokes< LowMachNavierStokesData<2,3> >;
template class LowMachNavierStokes< LowMachNavierStokesData<2,4> >;
template class LowMachNavierStokes< LowMachNavierStokesData<3,4> >;
template class LowMachNavierStokes< LowMachNavierStokesData<3,8> >;

}